{"id":1958,"date":"2019-06-17T14:14:51","date_gmt":"2019-06-17T12:14:51","guid":{"rendered":"https:\/\/www.thecodecampus.de\/blog\/?p=1958"},"modified":"2023-12-20T20:01:11","modified_gmt":"2023-12-20T19:01:11","slug":"building-a-rear-view-mirror-app-with-electron-and-angular","status":"publish","type":"post","link":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/","title":{"rendered":"Building a rearview mirror app with Electron and Angular"},"content":{"rendered":"<h1>Coming up with the idea<\/h1>\n<p>Let me sketch the scenario which led me to implement the rear view mirror desktop application. I was trying to fix a rather strange bug, at some point I realized I was stuck and asked a colleague for help. When we both realized that we need to ask another developer if he has an idea how we could approach the problem we drew attention from even more colleagues and all of a sudden 4 people where standing behind me, looking at my screen, arguing about solutions, pointing at lines of code on my screen &#8211; it was pretty hectic.<\/p>\n<p>It felt like I was driving on the highway with 3 kids on the backseat of my car, having a noisy argument. I felt like I needed a rearview mirror to observe what the kids behind me are doing.<\/p>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/what-vou-never-want-to-see-in-the-rearview-mirror-39831566.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1967 aligncenter\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/what-vou-never-want-to-see-in-the-rearview-mirror-39831566.png\" alt=\"\" width=\"500\" height=\"303\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/what-vou-never-want-to-see-in-the-rearview-mirror-39831566.png 500w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/what-vou-never-want-to-see-in-the-rearview-mirror-39831566-300x182.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>In the following article I&#8217;ll guide you through the process of creating the application. The source code is available on GitHub <a href=\"https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\">https:\/\/github.com\/kaihenzler\/electron-rearview-mirror<\/a><\/p>\n<p>You can find the binaries at: <a href=\"https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\/releases\/tag\/1.0.0\">https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\/releases\/tag\/1.0.0<\/a><\/p>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2577 size-large\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-1024x640.webp\" alt=\"\" width=\"1024\" height=\"640\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-1024x640.webp 1024w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-300x188.webp 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-768x480.webp 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-1536x960.webp 1536w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-2048x1280.webp 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Step 1: Looking for existing applications<\/h2>\n<p>Anytime I have such an idea I quickly look for already existing application on the internet. Because I&#8217;m using a Mac as my developer machine I started looking for apps in the Mac App Store. I found 4 applications which ranged from 1\u20ac &#8211; 4.50\u20ac and just display a rectangular image of your Laptop camera &#8211; not what I wanted. Looking for alternatives outside the Mac App Store also failed, I couldn&#8217;t find a suitable app that would fit my needs.<\/p>\n<h2>Step 2: Let&#8217;s build it on my own<\/h2>\n<p>There is no suitable available for free on the internet, so &#8220;let me build it on my own&#8221; I thought. As my focus is on web development and I don&#8217;t have any experience in writing Mac application I figured I should use web technologies to build this app. Building it using web technologies would also result in a cross-platform application that should work on all major operating systems. When talking about web technologies and desktop application the first thing that comes to your mind is <a href=\"https:\/\/electronjs.org\/\">Electron<\/a>. I have never developed an electron application but on there website they state:<\/p>\n<blockquote>\n<p class=\"lead text-center-sm\">If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application.<\/p>\n<\/blockquote>\n<p>I though that this shouldn&#8217;t be a problem for me, as I&#8217;m pretty experience with web technologies.<\/p>\n<h2>Step 3: Let&#8217;s use an Angular starter<\/h2>\n<p>As I&#8217;m very familiar with Angular I tried to look for an Electron starter-application that already bundles Angular. In hindsight I could have used plain JavaScript\/TypeScript to build it as pretty much no Angular-specific code was needed to do the job. Googling for &#8220;angular electron starter&#8221; gives you an amazing repo on GitHub that seems to include everything you need.<\/p>\n<p><a href=\"https:\/\/github.com\/maximegris\/angular-electron\">https:\/\/github.com\/maximegris\/angular-electron<\/a><\/p>\n<p>Cloning the repository<\/p>\n<pre class=\"lang:sh decode:true \">git clone https:\/\/github.com\/maximegris\/angular-electron.git<\/pre>\n<p>and installing the dependencies is all you need to get started<\/p>\n<pre class=\"lang:sh decode:true\">npm install<\/pre>\n<p>to start the application you can execute the following in the project&#8217;s root folder<\/p>\n<pre class=\"lang:sh decode:true\">npm run start<\/pre>\n<h2>Step 4: Display the live camera video<\/h2>\n<h3>Template<\/h3>\n<p>A couple of years ago I would&#8217;ve said that this is a huge effort and requires multiple developers to code for weeks to get this done for all operating systems. Luckily we live a world where modern Javascript and HTML API&#8217;s make our lives much simpler.<\/p>\n<p>We will do all of our work in the HomeComponent -&gt; <em><strong>src\/app\/components\/home\/home.component.html\u00a0<\/strong><\/em><\/p>\n<p>let&#8217;s get rid of the current content of the file and setup the HTML Template<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;div class=\"container\"&gt;\r\n  &lt;div class=\"camera-wrapper\"&gt;\r\n    &lt;video #camera autoplay&gt;&lt;\/video&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>The important part is the <strong>&lt;video&gt;<\/strong> tag in the inner div. The 2 wrapping div&#8217;s are just used for the styling and layout, we&#8217;ll get back to that later. We first add the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/video#Attributes\">autoplay<\/a> attribute to the <strong>&lt;video&gt;<\/strong> element that starts playing a video once we connect a MediaStream. The second thing we&#8217;re going to add is the <strong>#camera<\/strong> <a href=\"https:\/\/angular.io\/guide\/template-syntax#template-reference-variables-var\">Template Reference Variable<\/a> so we can easily select this element within our component class.<\/p>\n<h3>Component<\/h3>\n<pre class=\"lang:js decode:true\">import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular\/core';\r\n\r\n@Component({\r\n  selector: 'app-home',\r\n  templateUrl: '.\/home.component.html',\r\n  styleUrls: ['.\/home.component.scss']\r\n})\r\nexport class HomeComponent implements AfterViewInit {\r\n\r\n  @ViewChild('camera')\r\n  camera: ElementRef&lt;HTMLVideoElement&gt;;\r\n\r\n  constructor() {\r\n  }\r\n\r\n  async ngAfterViewInit() {\r\n    try {\r\n      this.camera.nativeElement.srcObject = await navigator.mediaDevices.getUserMedia({\r\n        video: {\r\n          width: 590,\r\n          height: 165,\r\n        }\r\n      });\r\n    } catch (e) {\r\n      alert('could not connect stream ' + e);\r\n    }\r\n  }\r\n}<\/pre>\n<p>We first take a look at line 10+11. In this statement we are using the <strong>ViewChild()<\/strong> decorator of Angular to get a reference to the <strong>&lt;video&gt;<\/strong> DOM Element we added in the step before. This gives us access to the raw DOM Element within the\u00a0<strong>ngAfterViewInit\u00a0<\/strong>lifecycle hook. We can now access it with\u00a0<strong>this.camera.nativeElement<\/strong><\/p>\n<p>In the next step we want to get the MediaStream of our laptop camera. Fortunately there is a very simple API for that. By simply calling <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/MediaDevices\/getUserMedia\">navigator.mediaDevices.getUserMedia()<\/a> in line 18 we get a Promise of a MediaStream. We are using async\/await in combination with try\/catch to easily assign the MediaStream to the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/HTMLMediaElement\/srcObject\">srcObject<\/a> attribute of the <strong>&lt;video&gt;<\/strong> element.<\/p>\n<p>That was all the magic to get a live video of your webcam showing up in your Electron App.<\/p>\n<h2>Step 5: Styling to make it look like a real rearview mirror<\/h2>\n<p>A quick Google search gives us a few promising images we can use for the background. The asset is also added to the <a href=\"https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\">GitHub Repo<\/a>, license and source is mentioned in the <strong>readme.md<\/strong> in the repository.<\/p>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/kisspng-mac-app-store-macos-apple-rear-view-mirror-car-mirror-5aca7264dc8f59.0751067815232169969034-1.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\" wp-image-1961 aligncenter\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/kisspng-mac-app-store-macos-apple-rear-view-mirror-car-mirror-5aca7264dc8f59.0751067815232169969034-1-300x300.png\" alt=\"\" width=\"186\" height=\"186\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/kisspng-mac-app-store-macos-apple-rear-view-mirror-car-mirror-5aca7264dc8f59.0751067815232169969034-1-300x300.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/kisspng-mac-app-store-macos-apple-rear-view-mirror-car-mirror-5aca7264dc8f59.0751067815232169969034-1-150x150.png 150w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/kisspng-mac-app-store-macos-apple-rear-view-mirror-car-mirror-5aca7264dc8f59.0751067815232169969034-1.png 512w\" sizes=\"auto, (max-width: 186px) 100vw, 186px\" \/><\/a><\/p>\n<p>Once we added the image to the src\/assets folder and renamed it to <strong>rear-view-background.png\u00a0<\/strong>we can look finally write some css to style our component. We are once again only working in the HomeComponent. I&#8217;m not going through all the things we are doing in here. But to summarize:<\/p>\n<ul>\n<li>Display the Background image in the center of the Viewport<\/li>\n<li>Fit the &lt;video&gt; element in the mirror and round the corners<\/li>\n<\/ul>\n<pre class=\"lang:less decode:true\">.container {\r\n  height: 100%;\r\n  display: flex;\r\n  align-items: center;\r\n  justify-content: center;\r\n\r\n  -webkit-background-size: cover;\r\n\r\n  background-image: url(\"assets\/rear-view-background.png\");\r\n  background-repeat: no-repeat;\r\n  background-size: 100%;\r\n  background-position-y: center;\r\n\r\n  .camera-wrapper {\r\n    padding-top: 40px;\r\n    video {\r\n      border-radius: 45px;\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<h2>Step 6: Configuring Electron<\/h2>\n<p>Until now our Application still has the default dimensions of the starter application. In this step we want to accomplish the look-and-feel of a real rear-view mirror. Typically the rear-view mirror is on the top right side of your viewport when your driving a car (or you live in a country where you drive on the left side of the road &#8211; you might want to tweak the settings to fit your needs). We also want to make the background of the application window transparent, so we only see the transparent background png and your desktop should shine through.<\/p>\n<p>In the Electron Angular starter there is a <strong>main.ts<\/strong> file where you can adjust the settings.<\/p>\n<pre class=\"lang:js decode:true\">\/\/ Create the browser window.\r\n  win = new BrowserWindow({\r\n    x: size.width - 650, \/\/ right side of the screen - width\r\n    y: 0, \/\/ all the way on the top\r\n    width: 650, \/\/ width of the mirror\r\n    height: 350, \/\/ height of the mirror\r\n    frame: false, \/\/ no frame around the main window\r\n    transparent: true, \/\/ added this for transparent background\r\n    resizable: false,\r\n    alwaysOnTop: true,\r\n    webPreferences: {\r\n      nodeIntegration: true,\r\n    },\r\n  });<\/pre>\n<p>Just take a look at the comments next to each line. We basically position the mirror on the top right corner, make it always appear on top when started, make the background transparent, remove the Frame around the main window and we block the resizing.<\/p>\n<p>To make the transparency work across platforms we have to introduce a little hack for linux. Also in the main.ts we have to delay the startup of the application a tiny bit (500ms).<\/p>\n<pre class=\"lang:js decode:true\">  \/\/ This method will be called when Electron has finished\r\n  \/\/ initialization and is ready to create browser windows.\r\n  \/\/ Some APIs can only be used after this event occurs.\r\n  app.on('ready', () =&gt; {\r\n    setTimeout(createWindow, 500);\r\n  });<\/pre>\n<p>A further optional step would be to replace the standard App Icon with a custom one. Similar to how we searched for a suitable background image, we can do a search for an App Icon. We just have to replace all icons (5 in total), that start with <strong>favicon*\u00a0<\/strong>in the src folder of the app.<\/p>\n<h2>Step 7: Bundling the Application<\/h2>\n<p>We programmed our application and adjusted the Electron config to fit our needs. We now want to create executables for our target operating system. Luckily the starter already has scripts that allow us to easily bundle the application. We can run either of the command to build an executable\/installer.<\/p>\n<pre class=\"lang:sh decode:true\">npm run electron:mac\r\nnpm run electron:linux\r\nnpm run electron:windows<\/pre>\n<p>After the command finishes the will be a <strong>release\u00a0<\/strong>folder in the project root. If you build the app for Mac there is a <strong><em>.dmg<\/em><\/strong> for Windows there is a <strong>.exe<\/strong> and for linux there is a <strong>*.AppImage<\/strong><\/p>\n<p>Note:<br \/>\nWindows and Mac can simply execute the resulting package. On Linux you first have to make the package executable (use chmod to make it executable).<\/p>\n<h2>Summary<\/h2>\n<p>This article shows how easy it can be to create funny (and a bit useless) application. The initial implementation of this rear-view mirror took me about 45 minutes, which is pretty impressive. I enjoyed working with Electron &#8211; it&#8217;s nice to debug because it basically is just a Google Chrome.<\/p>\n<p>The code can be found at: <a href=\"https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\">https:\/\/github.com\/kaihenzler\/electron-rearview-mirror<\/a><\/p>\n<p>The binaries can be found at: <a href=\"https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\/releases\/tag\/1.0.0\">https:\/\/github.com\/kaihenzler\/electron-rearview-mirror\/releases\/tag\/1.0.0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Coming up with the idea Let me sketch the scenario which led me to implement the rear view mirror desktop application. I was trying to fix a rather strange bug, at some point I realized I was stuck and asked a colleague for help. When we both realized that we need to ask another developer [&#8230;]<br \/><a class=\"meta-big\" href=\"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/\"> READ MORE<\/a><\/p>\n","protected":false},"author":6,"featured_media":1963,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,94,60],"tags":[],"class_list":["post-1958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular","category-css","category-typescript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building a rearview mirror app with Electron and Angular - Web Development Blog<\/title>\n<meta name=\"description\" content=\"Revolutionize app development. Build a rear-view mirror app with Electron and Angular. Elevate cross-platform innovation. Transform coding now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a rearview mirror app with Electron and Angular - Web Development Blog\" \/>\n<meta property=\"og:description\" content=\"Revolutionize app development. Build a rear-view mirror app with Electron and Angular. Elevate cross-platform innovation. Transform coding now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development tips and tricks - theCodeCampus Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-17T12:14:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-20T19:01:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-1024x640.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"640\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Kai Henzler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kai Henzler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/\"},\"author\":{\"name\":\"Kai Henzler\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/b9decc610011ed03b2117b5e02032132\"},\"headline\":\"Building a rearview mirror app with Electron and Angular\",\"datePublished\":\"2019-06-17T12:14:51+00:00\",\"dateModified\":\"2023-12-20T19:01:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/\"},\"wordCount\":1429,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Bildschirmfoto-2019-06-17-um-13.21.25.png\",\"articleSection\":[\"Angular\",\"CSS\",\"TypeScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/\",\"name\":\"Building a rearview mirror app with Electron and Angular - Web Development Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Bildschirmfoto-2019-06-17-um-13.21.25.png\",\"datePublished\":\"2019-06-17T12:14:51+00:00\",\"dateModified\":\"2023-12-20T19:01:11+00:00\",\"description\":\"Revolutionize app development. Build a rear-view mirror app with Electron and Angular. Elevate cross-platform innovation. Transform coding now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Bildschirmfoto-2019-06-17-um-13.21.25.png\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Bildschirmfoto-2019-06-17-um-13.21.25.png\",\"width\":3360,\"height\":2100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/building-a-rear-view-mirror-app-with-electron-and-angular\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a rearview mirror app with Electron and Angular\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"name\":\"Web Development tips and tricks - theCodeCampus Blog\",\"description\":\"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\",\"name\":\"theCodeCampus\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"width\":156,\"height\":156,\"caption\":\"theCodeCampus\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/b9decc610011ed03b2117b5e02032132\",\"name\":\"Kai Henzler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/kai-henzler-tcc-author-96x96.webp\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/kai-henzler-tcc-author-96x96.webp\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/kai-henzler-tcc-author-96x96.webp\",\"caption\":\"Kai Henzler\"},\"description\":\"I'm a web developer who is around since the AngularJS days (10+ years). My focus is on teaching others how to write simple and maintainable code.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kai-henzler-58484599\\\/\"],\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/author\\\/khenzler\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a rearview mirror app with Electron and Angular - Web Development Blog","description":"Revolutionize app development. Build a rear-view mirror app with Electron and Angular. Elevate cross-platform innovation. Transform coding now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/","og_locale":"en_US","og_type":"article","og_title":"Building a rearview mirror app with Electron and Angular - Web Development Blog","og_description":"Revolutionize app development. Build a rear-view mirror app with Electron and Angular. Elevate cross-platform innovation. Transform coding now!","og_url":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/","og_site_name":"Web Development tips and tricks - theCodeCampus Blog","article_published_time":"2019-06-17T12:14:51+00:00","article_modified_time":"2023-12-20T19:01:11+00:00","og_image":[{"width":1024,"height":640,"url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25-1024x640.png","type":"image\/png"}],"author":"Kai Henzler","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kai Henzler","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#article","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/"},"author":{"name":"Kai Henzler","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/b9decc610011ed03b2117b5e02032132"},"headline":"Building a rearview mirror app with Electron and Angular","datePublished":"2019-06-17T12:14:51+00:00","dateModified":"2023-12-20T19:01:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/"},"wordCount":1429,"commentCount":2,"publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25.png","articleSection":["Angular","CSS","TypeScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/","url":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/","name":"Building a rearview mirror app with Electron and Angular - Web Development Blog","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#primaryimage"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25.png","datePublished":"2019-06-17T12:14:51+00:00","dateModified":"2023-12-20T19:01:11+00:00","description":"Revolutionize app development. Build a rear-view mirror app with Electron and Angular. Elevate cross-platform innovation. Transform coding now!","breadcrumb":{"@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#primaryimage","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25.png","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/06\/Bildschirmfoto-2019-06-17-um-13.21.25.png","width":3360,"height":2100},{"@type":"BreadcrumbList","@id":"https:\/\/www.thecodecampus.de\/blog\/building-a-rear-view-mirror-app-with-electron-and-angular\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thecodecampus.de\/blog\/"},{"@type":"ListItem","position":2,"name":"Building a rearview mirror app with Electron and Angular"}]},{"@type":"WebSite","@id":"https:\/\/www.thecodecampus.de\/blog\/#website","url":"https:\/\/www.thecodecampus.de\/blog\/","name":"Web Development tips and tricks - theCodeCampus Blog","description":"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.","publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.thecodecampus.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.thecodecampus.de\/blog\/#organization","name":"theCodeCampus","url":"https:\/\/www.thecodecampus.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","width":156,"height":156,"caption":"theCodeCampus"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/b9decc610011ed03b2117b5e02032132","name":"Kai Henzler","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/06\/kai-henzler-tcc-author-96x96.webp","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/06\/kai-henzler-tcc-author-96x96.webp","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/06\/kai-henzler-tcc-author-96x96.webp","caption":"Kai Henzler"},"description":"I'm a web developer who is around since the AngularJS days (10+ years). My focus is on teaching others how to write simple and maintainable code.","sameAs":["https:\/\/www.linkedin.com\/in\/kai-henzler-58484599\/"],"url":"https:\/\/www.thecodecampus.de\/blog\/author\/khenzler\/"}]}},"_links":{"self":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":9,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"predecessor-version":[{"id":2579,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1958\/revisions\/2579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media\/1963"}],"wp:attachment":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}