{"id":9599,"date":"2015-12-29T12:11:37","date_gmt":"2015-12-29T10:11:37","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=9599"},"modified":"2015-12-17T19:47:51","modified_gmt":"2015-12-17T17:47:51","slug":"componentizing-workflow-angular-2","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/","title":{"rendered":"Componentizing Workflow for Angular 2"},"content":{"rendered":"<p>Yesterday I wrote a tweet about how I usually create components.<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">Great workflow for refactoring unwieldy components :-) <a href=\"https:\/\/t.co\/each4c2cm9\">https:\/\/t.co\/each4c2cm9<\/a><\/p>\n<p>&mdash; Kent C. Dodds \ud83c\udf0c (@kentcdodds) <a href=\"https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706?ref_src=twsrc%5Etfw\">December 9, 2015<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>A tweet is quite short, so let&#8217;s take a closer look at such workflow in more detail. Also, note that I&#8217;m using Angular 2 components here, but this holds in many other contexts as well, Angular 1.x, React,&#8230;<\/p>\n<p>When you start a new application, most often you get a static document from your UI design team, or you start from some <a href=\"http:\/\/www.getmdl.io\/templates\/\">predefined template<\/a>. That said, you need to have a strategy for <strong>decomposing that huge static HTML block<\/strong> into smaller components.<\/p>\n<p>My workflow usually consists in<\/p>\n<ol>\n<li>Create a component containing that huge static HTML block<\/li>\n<li>Identify reusable or autonomous parts<\/li>\n<li>Extract those parts into separate components<\/li>\n<li>Iterate, goto step 2.<\/li>\n<\/ol>\n<h2>1. The big component<\/h2>\n<p>So at step 1 you&#8217;ll get something like this.<\/p>\n<pre class=\" brush:php\">@Component({\r\n  selector: 'app-main',\r\n  template: `\r\n    &lt;div class=\"demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header has-drawer is-upgraded\" data-upgraded=\",MaterialLayout\"&gt;\r\n      &lt;header class=\"demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600 is-casting-shadow\"&gt;\r\n        &lt;div class=\"mdl-layout__drawer-button\"&gt; &lt;i class=\"material-icons\"&gt;menu&lt;\/i&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"mdl-layout__header-row\"&gt;\r\n          &lt;span class=\"mdl-layout-title\"&gt;Home&lt;\/span&gt;\r\n          &lt;div class=\"mdl-layout-spacer\"&gt;&lt;\/div&gt;\r\n          &lt;div class=\"mdl-textfield mdl-js-textfield mdl-textfield--expandable is-upgraded\" data-upgraded=\",MaterialTextfield\"&gt;\r\n            &lt;label class=\"mdl-button mdl-js-button mdl-button--icon\" for=\"search\" data-upgraded=\",MaterialButton\"&gt; &lt;i class=\"material-icons\"&gt;search&lt;\/i&gt;\r\n            &lt;\/label&gt;\r\n            &lt;div class=\"mdl-textfield__expandable-holder\"&gt;\r\n              &lt;input class=\"mdl-textfield__input\" type=\"text\" id=\"search\"&gt;\r\n              &lt;label class=\"mdl-textfield__label\" for=\"search\"&gt;Enter your query...&lt;\/label&gt;\r\n            &lt;\/div&gt;\r\n          &lt;\/div&gt;\r\n          &lt;button class=\"mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon\" id=\"hdrbtn\" data-upgraded=\",MaterialButton,MaterialRipple\"&gt;\r\n            &lt;i class=\"material-icons\"&gt;more_vert&lt;\/i&gt;\r\n            &lt;span class=\"mdl-button__ripple-container\"&gt;\r\n              &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n            &lt;\/span&gt;\r\n          &lt;\/button&gt;\r\n          &lt;div class=\"mdl-menu__container is-upgraded\"&gt;\r\n            &lt;div class=\"mdl-menu__outline mdl-menu--bottom-right\"&gt;&lt;\/div&gt;\r\n            &lt;ul class=\"mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right mdl-js-ripple-effect--ignore-events\" for=\"hdrbtn\" data-upgraded=\",MaterialMenu,MaterialRipple\"&gt;\r\n              &lt;li class=\"mdl-menu__item mdl-js-ripple-effect\" tabindex=\"-1\" data-upgraded=\",MaterialRipple\"&gt;\r\n                About\r\n                &lt;span class=\"mdl-menu__item-ripple-container\"&gt;\r\n                  &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n                &lt;\/span&gt;\r\n              &lt;\/li&gt;\r\n              &lt;li class=\"mdl-menu__item mdl-js-ripple-effect\" tabindex=\"-1\" data-upgraded=\",MaterialRipple\"&gt;\r\n                Contact\r\n                &lt;span class=\"mdl-menu__item-ripple-container\"&gt;\r\n                  &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n                &lt;\/span&gt;\r\n              &lt;\/li&gt;\r\n              &lt;li class=\"mdl-menu__item mdl-js-ripple-effect\" tabindex=\"-1\" data-upgraded=\",MaterialRipple\"&gt;\r\n                Legal information\r\n                &lt;span class=\"mdl-menu__item-ripple-container\"&gt;\r\n                  &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n                &lt;\/span&gt;\r\n              &lt;\/li&gt;\r\n            &lt;\/ul&gt;\r\n          &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/header&gt;\r\n      &lt;div class=\"demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50\"&gt;\r\n        &lt;header class=\"demo-drawer-header\"&gt;\r\n          &lt;img src=\"images\/user.jpg\" class=\"demo-avatar\"&gt;\r\n          &lt;div class=\"demo-avatar-dropdown\"&gt;\r\n            &lt;span&gt;hello@example.com&lt;\/span&gt;\r\n            &lt;div class=\"mdl-layout-spacer\"&gt;&lt;\/div&gt;\r\n            ...\r\n            &lt;div class=\"mdl-menu__container is-upgraded\"&gt;\r\n              &lt;div class=\"mdl-menu__outline mdl-menu--bottom-right\"&gt;&lt;\/div&gt;\r\n              ...\r\n            &lt;\/div&gt;\r\n          &lt;\/div&gt;\r\n        &lt;\/header&gt;\r\n        &lt;nav class=\"demo-navigation mdl-navigation mdl-color--blue-grey-800\"&gt;\r\n          &lt;a class=\"mdl-navigation__link\" href=\"\"&gt;\r\n            &lt;i class=\"mdl-color-text--blue-grey-400 material-icons\" role=\"presentation\"&gt;home&lt;\/i&gt;\r\n            Home\r\n          &lt;\/a&gt;\r\n          &lt;a class=\"mdl-navigation__link\" href=\"\"&gt;\r\n            &lt;i class=\"mdl-color-text--blue-grey-400 material-icons\" role=\"presentation\"&gt;inbox&lt;\/i&gt;\r\n            Inbox\r\n          &lt;\/a&gt;\r\n        &lt;\/nav&gt;\r\n      &lt;\/div&gt;\r\n      &lt;main class=\"mdl-layout__content mdl-color--grey-100\"&gt;\r\n        &lt;div class=\"mdl-grid demo-content\"&gt;\r\n          &lt;div class=\"demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid\"&gt;\r\n\r\n            &lt;svg fill=\"currentColor\" width=\"200px\" height=\"200px\" viewBox=\"0 0 1 1\" class=\"demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop\"&gt;\r\n              ...\r\n            &lt;\/svg&gt;\r\n            &lt;svg fill=\"currentColor\" width=\"200px\" height=\"200px\" viewBox=\"0 0 1 1\" class=\"demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop\"&gt;\r\n              ...\r\n            &lt;\/svg&gt;\r\n          &lt;\/div&gt;\r\n          ...\r\n        &lt;\/div&gt;\r\n      &lt;\/main&gt;\r\n    &lt;\/div&gt;\r\n  `\r\n})\r\nexport class MainCmp {}<\/pre>\n<p>Totally not comprehensible, nor maintainable. Also, <strong>don&#8217;t fall into the trap of simply externalizing this into an HTML page<\/strong> and you&#8217;re done, like..<\/p>\n<pre class=\" brush:php\">@Component({\r\n  selector: 'app-main',\r\n  templateUrl: '.\/main.html'\r\n})\r\nexport class MainCmp {}<\/pre>\n<p>Neat, right. Well, <strong>no, you&#8217;re just hiding the crap<\/strong> <img decoding=\"async\" title=\":wink:\" src=\"https:\/\/assets.github.com\/images\/icons\/emoji\/unicode\/1f609.png\" alt=\"\" width=\"20\" height=\"20\" align=\"absmiddle\" \/>.<\/p>\n<h2>2. Identify components<\/h2>\n<p>For a first high level overview, the best is to look at the static HTML page of our huge <code>app-main<\/code> component.<\/p>\n<figure>\n<p><figure id=\"attachment_9636\" aria-describedby=\"caption-attachment-9636\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/12\/angular2-componentizing.png\"><img decoding=\"async\" class=\"size-large wp-image-9636\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/12\/angular2-componentizing-1024x681.png\" alt=\"Example of the getmdl.io Dashboard template\" width=\"620\" height=\"412\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/12\/angular2-componentizing-1024x681.png 1024w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/12\/angular2-componentizing-300x200.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/12\/angular2-componentizing.png 1132w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-9636\" class=\"wp-caption-text\">Example of the getmdl.io Dashboard template<\/figcaption><\/figure><figcaption> <\/figcaption><\/figure>\n<p>When I look at this I can immediately spot<\/p>\n<ul>\n<li>a header area<\/li>\n<li>a main area\/dashboard<\/li>\n<li>a sidebar area<\/li>\n<\/ul>\n<h2>3. Extract new components and re-assemble<\/h2>\n<p>Once we&#8217;ve identified the components, we can start creating new ones and extract the according HTML parts into them.<\/p>\n<pre class=\" brush:php\">\/\/ header component file\r\n@Component({\r\n  selector: 'app-header',\r\n  template: `\r\n    &lt;div class=\"mdl-layout__drawer-button\"&gt; &lt;i class=\"material-icons\"&gt;menu&lt;\/i&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"mdl-layout__header-row\"&gt;\r\n      &lt;span class=\"mdl-layout-title\"&gt;Home&lt;\/span&gt;\r\n      &lt;div class=\"mdl-layout-spacer\"&gt;&lt;\/div&gt;\r\n      &lt;div class=\"mdl-textfield mdl-js-textfield mdl-textfield--expandable is-upgraded\" data-upgraded=\",MaterialTextfield\"&gt;\r\n        &lt;label class=\"mdl-button mdl-js-button mdl-button--icon\" for=\"search\" data-upgraded=\",MaterialButton\"&gt; &lt;i class=\"material-icons\"&gt;search&lt;\/i&gt;\r\n        &lt;\/label&gt;\r\n        &lt;div class=\"mdl-textfield__expandable-holder\"&gt;\r\n          &lt;input class=\"mdl-textfield__input\" type=\"text\" id=\"search\"&gt;\r\n          &lt;label class=\"mdl-textfield__label\" for=\"search\"&gt;Enter your query...&lt;\/label&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n      &lt;button class=\"mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon\" id=\"hdrbtn\" data-upgraded=\",MaterialButton,MaterialRipple\"&gt;\r\n        &lt;i class=\"material-icons\"&gt;more_vert&lt;\/i&gt;\r\n        &lt;span class=\"mdl-button__ripple-container\"&gt;\r\n          &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n        &lt;\/span&gt;\r\n      &lt;\/button&gt;\r\n      &lt;div class=\"mdl-menu__container is-upgraded\"&gt;\r\n        &lt;div class=\"mdl-menu__outline mdl-menu--bottom-right\"&gt;&lt;\/div&gt;\r\n        &lt;ul class=\"mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right mdl-js-ripple-effect--ignore-events\" for=\"hdrbtn\" data-upgraded=\",MaterialMenu,MaterialRipple\"&gt;\r\n          &lt;li class=\"mdl-menu__item mdl-js-ripple-effect\" tabindex=\"-1\" data-upgraded=\",MaterialRipple\"&gt;\r\n            About\r\n            &lt;span class=\"mdl-menu__item-ripple-container\"&gt;\r\n              &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n            &lt;\/span&gt;\r\n          &lt;\/li&gt;\r\n          &lt;li class=\"mdl-menu__item mdl-js-ripple-effect\" tabindex=\"-1\" data-upgraded=\",MaterialRipple\"&gt;\r\n            Contact\r\n            &lt;span class=\"mdl-menu__item-ripple-container\"&gt;\r\n              &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n            &lt;\/span&gt;\r\n          &lt;\/li&gt;\r\n          &lt;li class=\"mdl-menu__item mdl-js-ripple-effect\" tabindex=\"-1\" data-upgraded=\",MaterialRipple\"&gt;\r\n            Legal information\r\n            &lt;span class=\"mdl-menu__item-ripple-container\"&gt;\r\n              &lt;span class=\"mdl-ripple\"&gt;&lt;\/span&gt;\r\n            &lt;\/span&gt;\r\n          &lt;\/li&gt;\r\n        &lt;\/ul&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  `\r\n})\r\nexport class HeaderCmp {}<\/pre>\n<p>You repeat the same for our sidebar and main area dashboard. Finally we should get something like this.<\/p>\n<pre class=\" brush:php\">import { HeaderCmp } from '.\/app-header';\r\nimport { SidebarCmp } from '.\/app-sidebar';\r\nimport { DashboardCmp } from '.\/app-dashboard';\r\n\r\n@Component({\r\n  selector: 'app',\r\n  template: `\r\n    &lt;div class=\"demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header has-drawer is-upgraded\" data-upgraded=\",MaterialLayout\"&gt;\r\n      &lt;app-header class=\"demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600 is-casting-shadow\"&gt;\r\n      &lt;\/app-header&gt;\r\n\r\n      &lt;app-sidebar class=\"demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50\"&gt;\r\n      &lt;\/app-sidebar&gt;\r\n\r\n      &lt;app-main class=\"mdl-layout__content mdl-color--grey-100\"&gt;\r\n      &lt;\/app-main&gt;\r\n    &lt;\/div&gt;\r\n  `\r\n})\r\nexport class MainCmp {}<\/pre>\n<h2>4. Iterate<\/h2>\n<p>Obviously, these components are still way too large. So iterate, basically <strong>go back to step 2<\/strong>, take the first component (i.e. our <code>app-header<\/code>) and extract it into separate ones again, until you get to a point where you have reasonable-sized components.<\/p>\n<p>During such process you may naturally even arrive at components so generic that they&#8217;re reusable across multiple applications. So you could even extract them into a separate, dedicated library.<\/p>\n<h2>Conclusion<\/h2>\n<p>I think you got the main idea. Obviously you&#8217;ll do the extract and re-compose in a much quicker way after a while, even in your head &#8220;in-memory&#8221; <img decoding=\"async\" title=\":smiley:\" src=\"https:\/\/assets.github.com\/images\/icons\/emoji\/unicode\/1f603.png\" alt=\"\" width=\"20\" height=\"20\" align=\"absmiddle\" \/>, but the concept is this basically.<\/p>\n<p>Back when I was a student at the university, when they explained us the concept of recursion in algorithms, they presented the concept of &#8220;divide and conquer&#8221;. From now and then I get reminded to that as it is very much the same here. You take a piece, extract it and then assemble it back into the main part.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/juristr.com\/blog\/2015\/12\/componentizing-workflow\/\">Componentizing Workflow for Angular 2<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Juri Strumpflohner at the <a href=\"http:\/\/juristr.com\/blog\/\">Juri Strumpflohner&#8217;s TechBlog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I wrote a tweet about how I usually create components. Great workflow for refactoring unwieldy components :-) https:\/\/t.co\/each4c2cm9 &mdash; Kent C. Dodds \ud83c\udf0c (@kentcdodds) December 9, 2015 A tweet is quite short, so let&#8217;s take a closer look at such workflow in more detail. Also, note that I&#8217;m using Angular 2 components here, but &hellip;<\/p>\n","protected":false},"author":5,"featured_media":909,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-9599","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Componentizing Workflow for Angular 2 - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Yesterday I wrote a tweet about how I usually create components. https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706 A tweet is quite short, so let&#039;s\" \/>\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.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Componentizing Workflow for Angular 2 - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Yesterday I wrote a tweet about how I usually create components. https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706 A tweet is quite short, so let&#039;s\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-29T10:11:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Juri Strumpflohner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/juristr\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juri Strumpflohner\" \/>\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.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\"},\"author\":{\"name\":\"Juri Strumpflohner\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/33d3ee7edb105a80f1ff7199925b3060\"},\"headline\":\"Componentizing Workflow for Angular 2\",\"datePublished\":\"2015-12-29T10:11:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\"},\"wordCount\":458,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"articleSection\":[\"Angular.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\",\"name\":\"Componentizing Workflow for Angular 2 - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2015-12-29T10:11:37+00:00\",\"description\":\"Yesterday I wrote a tweet about how I usually create components. https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706 A tweet is quite short, so let's\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Angular.js\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Componentizing Workflow for Angular 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/33d3ee7edb105a80f1ff7199925b3060\",\"name\":\"Juri Strumpflohner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g\",\"caption\":\"Juri Strumpflohner\"},\"description\":\"Juri Strumpflohner mainly operates in the web sector developing rich applications with HTML5 and JavaScript. Beside having a Java background and developing Android applications he currently works as a software architect in the e-government sector. When he\u2019s not coding or blogging about his newest discoveries, he is practicing Yoseikan Budo where he owns a 2nd DAN.\",\"sameAs\":[\"http:\/\/juristr.com\/blog\/\",\"http:\/\/linkedin.com\/in\/juristr\/\",\"https:\/\/x.com\/http:\/\/twitter.com\/juristr\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/juri-strumpflohner\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Componentizing Workflow for Angular 2 - Web Code Geeks - 2026","description":"Yesterday I wrote a tweet about how I usually create components. https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706 A tweet is quite short, so let's","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.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/","og_locale":"en_US","og_type":"article","og_title":"Componentizing Workflow for Angular 2 - Web Code Geeks - 2026","og_description":"Yesterday I wrote a tweet about how I usually create components. https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706 A tweet is quite short, so let's","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-12-29T10:11:37+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","type":"image\/jpeg"}],"author":"Juri Strumpflohner","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/juristr","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Juri Strumpflohner","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/"},"author":{"name":"Juri Strumpflohner","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/33d3ee7edb105a80f1ff7199925b3060"},"headline":"Componentizing Workflow for Angular 2","datePublished":"2015-12-29T10:11:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/"},"wordCount":458,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","articleSection":["Angular.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/","name":"Componentizing Workflow for Angular 2 - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2015-12-29T10:11:37+00:00","description":"Yesterday I wrote a tweet about how I usually create components. https:\/\/twitter.com\/kentcdodds\/status\/674692800378568706 A tweet is quite short, so let's","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/componentizing-workflow-angular-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Angular.js","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/"},{"@type":"ListItem","position":4,"name":"Componentizing Workflow for Angular 2"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/33d3ee7edb105a80f1ff7199925b3060","name":"Juri Strumpflohner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g","caption":"Juri Strumpflohner"},"description":"Juri Strumpflohner mainly operates in the web sector developing rich applications with HTML5 and JavaScript. Beside having a Java background and developing Android applications he currently works as a software architect in the e-government sector. When he\u2019s not coding or blogging about his newest discoveries, he is practicing Yoseikan Budo where he owns a 2nd DAN.","sameAs":["http:\/\/juristr.com\/blog\/","http:\/\/linkedin.com\/in\/juristr\/","https:\/\/x.com\/http:\/\/twitter.com\/juristr"],"url":"https:\/\/www.webcodegeeks.com\/author\/juri-strumpflohner\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/9599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=9599"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/9599\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/909"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=9599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=9599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=9599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}