{"id":1842,"date":"2019-04-15T12:51:44","date_gmt":"2019-04-15T10:51:44","guid":{"rendered":"https:\/\/www.thecodecampus.de\/blog\/?p=1842"},"modified":"2023-12-20T20:03:56","modified_gmt":"2023-12-20T19:03:56","slug":"how-to-use-angular-environments-shown-with-a-tetris-game","status":"publish","type":"post","link":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/","title":{"rendered":"How to use Angular Environments shown with a Tetris Game"},"content":{"rendered":"<h2>About<\/h2>\n<p>Ng-dropping-stones is a small Tetris clone built with Angular 7.<\/p>\n<p>It can be played in the browser as well as on a raspberry pi based arcade machine, which we present at fairs (JavaLand, enterJS, Herbstcampus).<\/p>\n<h2>History<\/h2>\n<p>At first, ng-dropping-stones was designed for our arcade machine to present it on fairs. It was very well received and we thought it makes sense that it is available for playing anywhere else. So we decided to put it live on <a href=\"https:\/\/w11k.de\/ng-dropping-stones\">w11k\u2019s website<\/a>. For the web application, a few adjustments were necessary. So how do we put both versions into one application? We&#8217;ll get to that soon.<\/p>\n<h2>Arcade vs Web Version<\/h2>\n<p>Both versions are the same angular application, but with small differences in the process.<\/p>\n<h3>Arcade<\/h3>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1844 size-full\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png\" alt=\"\" width=\"1817\" height=\"1163\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png 1817w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade-300x192.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade-768x492.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade-1024x655.png 1024w\" sizes=\"auto, (max-width: 1817px) 100vw, 1817px\" \/><\/a><\/p>\n<p>The arcade version can only be played in single player mode. Here, the highscore is stored locally if you have given your email address. Only then one can participate in our contest at the fairs, otherwise you can of course just play for fun. The illustrated control refers to our arcade machine:<\/p>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2580 size-full\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-scaled.webp\" alt=\"\" width=\"1440\" height=\"2560\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-scaled.webp 1440w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-169x300.webp 169w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-576x1024.webp 576w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-768x1365.webp 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-864x1536.webp 864w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/20180413_1156047605752982092846658-1-e1555314240635-1152x2048.webp 1152w\" sizes=\"auto, (max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<h3>Web<\/h3>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1847 size-full\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones.png\" alt=\"\" width=\"1819\" height=\"1166\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones.png 1819w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-300x192.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-768x492.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-1024x656.png 1024w\" sizes=\"auto, (max-width: 1819px) 100vw, 1819px\" \/><\/a><\/p>\n<p>In the web version you can play in single player and multiplayer mode. \u200b\u200b<span class=\"tlid-translation translation\" lang=\"en\">For a better user experience, the highscore is stored on a server, not locally like in the arcade version. <span class=\"\" title=\"\">You should be able to compare your skills with other single players.<\/span> <span class=\"\" title=\"\">With multiplayer mode, you can compete against your friends and see who can do better.<\/span><\/span><\/p>\n<h3>Game<\/h3>\n<h4>Singleplayer Mode<\/h4>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-game.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1848 size-full\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-game.png\" alt=\"\" width=\"1807\" height=\"1157\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-game.png 1807w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-game-300x192.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-game-768x492.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-game-1024x656.png 1024w\" sizes=\"auto, (max-width: 1807px) 100vw, 1807px\" \/><\/a><\/p>\n<h4>Multiplayer Mode<\/h4>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-multi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1868 size-full\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-multi.png\" alt=\"\" width=\"1809\" height=\"1154\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-multi.png 1809w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-multi-300x191.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-multi-768x490.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-multi-1024x653.png 1024w\" sizes=\"auto, (max-width: 1809px) 100vw, 1809px\" \/><\/a><\/p>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span title=\"\">In this mode, the players can see how many points they are apart.<\/span> <span class=\"\" title=\"\">The better one sees how much advantage he has and the other player how many he has to catch up with.<\/span><\/span><\/p>\n<h2>How to differentiate<\/h2>\n<p>How did we implement it to adapt the application environment specific?<\/p>\n<p>The answer is actually quite simple: We tell the program what version we want to have.<\/p>\n<p>We implemented it with angular environment variables.<\/p>\n<h3>Way to go<\/h3>\n<p>First of all we create 2 different files in the environments folder of our angular application.<\/p>\n<p><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/Screenshot-from-2019-04-15-09-48-58.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1849 size-full\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/Screenshot-from-2019-04-15-09-48-58.png\" alt=\"\" width=\"315\" height=\"148\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/Screenshot-from-2019-04-15-09-48-58.png 315w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/Screenshot-from-2019-04-15-09-48-58-300x141.png 300w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><\/a><\/p>\n<p>These include a key named web (boolean), which describes whether the application is in the web mode or not.<\/p>\n<pre class=\"lang:js decode:true\" title=\"environment.arcade.ts\">export const environment = {\r\n  production: true,\r\n  web: false\r\n}<\/pre>\n<p>The exported environment variable, we can import us to all required code sections and depending on the version the program can show or do different things.<\/p>\n<p>In the following section, we use the environment variable to distinguish between two different types of storage: local and server-side. All we have to do is import our environment variable.<\/p>\n<pre class=\"lang:js decode:true\" title=\"highscore.module.ts\">import { environment } from '..\/..\/..\/environments\/environment';\r\n\r\n@NgModule({\r\n  imports: [\r\n    CommonModule\r\n  ],\r\n  declarations: [ ],\r\n  providers: [\r\n    {\r\n      provide: StorageService,\r\n      useClass: environment.web ? FirebaseStorageService : LocalStorageService\r\n    }\r\n  ]\r\n})\r\nexport class HighscoreModule { }<\/pre>\n<p>In our angular.json file we can create the new environment in the build configurations part where we specify the environment file.<\/p>\n<pre class=\"lang:js decode:true\" title=\"angular.json\">\"build\": {\r\n  \"configurations\": {\r\n    \"arcade\": {\r\n      \"fileReplacements\": [\r\n        {\r\n          \"replace\": \"src\/environments\/environment.ts\",\r\n          \"with\": \"src\/environments\/environment.arcade.ts\"\r\n        }\r\n      ]\r\n    }\r\n  }\r\n}<\/pre>\n<p>To execute the associated build to the separated start scripts, the following configurations are necessary in the serve configuration section of the angular.json.<\/p>\n<pre class=\"lang:js decode:true\" title=\"angular.json\">\"serve\": {\r\n  \"configurations\": {\r\n    \"arcade\": {\r\n      \"browserTarget\": \"ngrx:tetris:build:arcade\"\r\n    }\r\n  }\r\n}<\/pre>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">Finally, we define different scripts for each environment in our package.json.<\/span><\/span><\/p>\n<pre class=\"lang:js decode:true\" title=\"package.json\">\"scripts\": {\r\n  \"ng\": \"ng\",\r\n  \"start\": \"ng serve --host 0.0.0.0\",\r\n  \"start:arcade\": \"ng serve --host 0.0.0.0 --configuration=arcade\",\r\n  \"build:w11k.de\": \"ng build --aot --base-href='\/ng-dropping-stones\/'\",\r\n  \"build:arcade\": \"ng build --aot --configuration=arcade\"\r\n}<\/pre>\n<p>The only small difference is the parameter &#8220;configuration&#8221;<span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">, which we give in the scripts<\/span><\/span>. If we want to start the arcade version, we have to set it because otherwise the application runs in web mode. The parameter addresses &#8220;arcade&#8221; in the depending configuration section of the angular.json file.<\/p>\n<p>You will find the complete code on <a href=\"https:\/\/github.com\/w11k\/ng-dropping-stones\">https:\/\/github.com\/w11k\/ng-dropping-stones<\/a> or you can start a new game on the w11k website: <a href=\"https:\/\/w11k.de\/ng-dropping-stones\">https:\/\/w11k.de\/ng-dropping-stones<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>About Ng-dropping-stones is a small Tetris clone built with Angular 7. It can be played in the browser as well as on a raspberry pi based arcade machine, which we present at fairs (JavaLand, enterJS, Herbstcampus). History At first, ng-dropping-stones was designed for our arcade machine to present it on fairs. It was very well [&#8230;]<br \/><a class=\"meta-big\" href=\"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/\"> READ MORE<\/a><\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,60],"tags":[],"class_list":["post-1842","post","type-post","status-publish","format-standard","hentry","category-angular","category-typescript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to use Angular Environments shown with a Tetris Game - Web Development Blog<\/title>\n<meta name=\"description\" content=\"Master Angular environments through Tetris! Learn to utilize environments effectively for seamless development. Elevate your Angular skills today!\" \/>\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\/how-to-use-angular-environments-shown-with-a-tetris-game\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use Angular Environments shown with a Tetris Game - Web Development Blog\" \/>\n<meta property=\"og:description\" content=\"Master Angular environments through Tetris! Learn to utilize environments effectively for seamless development. Elevate your Angular skills today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development tips and tricks - theCodeCampus Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-15T10:51:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-20T19:03:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png\" \/>\n<meta name=\"author\" content=\"theCodeCampus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"theCodeCampus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/\"},\"author\":{\"name\":\"theCodeCampus\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/276bbda2f8da73154f22fb652201cfbc\"},\"headline\":\"How to use Angular Environments shown with a Tetris Game\",\"datePublished\":\"2019-04-15T10:51:44+00:00\",\"dateModified\":\"2023-12-20T19:03:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/\"},\"wordCount\":553,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/ng-dropping-stones-arcade.png\",\"articleSection\":[\"Angular\",\"TypeScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/\",\"name\":\"How to use Angular Environments shown with a Tetris Game - Web Development Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/ng-dropping-stones-arcade.png\",\"datePublished\":\"2019-04-15T10:51:44+00:00\",\"dateModified\":\"2023-12-20T19:03:56+00:00\",\"description\":\"Master Angular environments through Tetris! Learn to utilize environments effectively for seamless development. Elevate your Angular skills today!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/ng-dropping-stones-arcade.png\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/ng-dropping-stones-arcade.png\",\"width\":1817,\"height\":1163},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/how-to-use-angular-environments-shown-with-a-tetris-game\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Angular Environments shown with a Tetris Game\"}]},{\"@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\\\/276bbda2f8da73154f22fb652201cfbc\",\"name\":\"theCodeCampus\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"caption\":\"theCodeCampus\"},\"description\":\"Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/thecodecampus\\\/\"],\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Angular Environments shown with a Tetris Game - Web Development Blog","description":"Master Angular environments through Tetris! Learn to utilize environments effectively for seamless development. Elevate your Angular skills today!","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\/how-to-use-angular-environments-shown-with-a-tetris-game\/","og_locale":"en_US","og_type":"article","og_title":"How to use Angular Environments shown with a Tetris Game - Web Development Blog","og_description":"Master Angular environments through Tetris! Learn to utilize environments effectively for seamless development. Elevate your Angular skills today!","og_url":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/","og_site_name":"Web Development tips and tricks - theCodeCampus Blog","article_published_time":"2019-04-15T10:51:44+00:00","article_modified_time":"2023-12-20T19:03:56+00:00","og_image":[{"url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png","type":"","width":"","height":""}],"author":"theCodeCampus","twitter_card":"summary_large_image","twitter_misc":{"Written by":"theCodeCampus","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#article","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/"},"author":{"name":"theCodeCampus","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/276bbda2f8da73154f22fb652201cfbc"},"headline":"How to use Angular Environments shown with a Tetris Game","datePublished":"2019-04-15T10:51:44+00:00","dateModified":"2023-12-20T19:03:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/"},"wordCount":553,"commentCount":0,"publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png","articleSection":["Angular","TypeScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/","url":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/","name":"How to use Angular Environments shown with a Tetris Game - Web Development Blog","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#primaryimage"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png","datePublished":"2019-04-15T10:51:44+00:00","dateModified":"2023-12-20T19:03:56+00:00","description":"Master Angular environments through Tetris! Learn to utilize environments effectively for seamless development. Elevate your Angular skills today!","breadcrumb":{"@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#primaryimage","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2019\/04\/ng-dropping-stones-arcade.png","width":1817,"height":1163},{"@type":"BreadcrumbList","@id":"https:\/\/www.thecodecampus.de\/blog\/how-to-use-angular-environments-shown-with-a-tetris-game\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thecodecampus.de\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use Angular Environments shown with a Tetris Game"}]},{"@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\/276bbda2f8da73154f22fb652201cfbc","name":"theCodeCampus","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","caption":"theCodeCampus"},"description":"Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.","sameAs":["https:\/\/www.linkedin.com\/showcase\/thecodecampus\/"],"url":"https:\/\/www.thecodecampus.de\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1842","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\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/comments?post=1842"}],"version-history":[{"count":33,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1842\/revisions"}],"predecessor-version":[{"id":2582,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1842\/revisions\/2582"}],"wp:attachment":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media?parent=1842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/categories?post=1842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/tags?post=1842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}