{"id":11301,"date":"2016-03-11T12:11:49","date_gmt":"2016-03-11T10:11:49","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=11301"},"modified":"2016-03-03T16:10:47","modified_gmt":"2016-03-03T14:10:47","slug":"quickstart-angular2-typescript-gulp","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/","title":{"rendered":"Quickstart: Angular2 with TypeScript and Gulp"},"content":{"rendered":"<p>Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based architecture, new dependency injection or built-in modularity. In this step-by-step tutorial you will learn how how to get started with Angular2 with TypeScript and Gulp. Source code available on Github.<\/p>\n<h2>Introduction<\/h2>\n<p>Angular 1.x is probably still the most popular Front-end framework these days and there is no doubt Angular 1.x is a great framework. However it is incredibly difficult to master. The complex API and many concepts introduced since its launch make understanding the framework and thus using it effectively really hard.<\/p>\n<p>Angular2, on the other hand, is a new opening. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based architecture, new dependency injection or built-in modularity.<\/p>\n<p>If you want to practice and start learning Angular2 there is no better place than <a href=\"http:\/\/angular.io\" target=\"_blank\">angular.io<\/a>. But if you are looking for the ways of utilizing Angular2 with Gulp &#8211; this tutorial is for you.<\/p>\n<p><strong><em>Note<\/em><\/strong>: The source code for this article can be found on Github: <a href=\"https:\/\/github.com\/kolorobot\/angular2-typescript-gulp\" target=\"_blank\">https:\/\/github.com\/kolorobot\/angular2-typescript-gulp<\/a>. I assume the repository gets updated quite often.<\/p>\n<h2>Project layout<\/h2>\n<p>The initial project is based on the Angular2 Quickstart: <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/quickstart.html\" target=\"_blank\">https:\/\/angular.io\/docs\/ts\/latest\/quickstart.html<\/a> with some changes. The most important change is to separate source files from build files: <code>src<\/code> directory contains all the source files and <code>build<\/code> contains all compiled and processed files. The server uses <code>build<\/code> directory as a base directory to serve content.<\/p>\n<pre class=\"brush:php\">angular2-typescript-gulp\r\n|   .gitignore\r\n|   bs-config.json  -&gt; BrowserSync configuration\r\n|   gulpfile.ts     -&gt; Gulp in TypeScript\r\n|   package.json    -&gt; npm configuration\r\n|   tsconfig.json   -&gt; TypeScript configuration\r\n|   typings.json    -&gt; TypeScript typings definitions\r\n|\r\n\\---src\r\n    |   index.html  -&gt; Starting point for the application\r\n    |\r\n    \\---app         -&gt; Application modules\r\n            app.component.ts -&gt; Main application component\r\n            app.html         -&gt; Main application template\r\n            main.ts          -&gt; Application bootstrap<\/pre>\n<p>The script for creating directory structure:<\/p>\n<pre class=\"brush:bash\">\r\nmkdir angular2-typescript-gulp\\src\\app\r\ncd angular2-typescript-gulp\r\ntouch .gitignore bs-config.json gulpfile.ts package.json tsconfig.json typings.json\r\ncd src\r\ntouch index.html\r\ncd app\r\ntouch app.component.ts app.html main.ts\r\n<\/pre>\n<h2>NPM global dependencies<\/h2>\n<p>Assuming node and npm is already installed, you may install global dependencies by invoking the following command:<\/p>\n<pre class=\"brush:bash\">npm i -g &lt;dependency&gt;<\/pre>\n<p>Required global dependencies in order to run the project:<\/p>\n<ul>\n<li>gulp and gulp-cli (3.9.1)<\/li>\n<li>typings (0.6.8)<\/li>\n<li>typescript (1.8.2)<\/li>\n<li>ts-node (0.5.5)<\/li>\n<\/ul>\n<h2>TypeScript confguration &#8211; tsconfig.ts<\/h2>\n<p>Compiled files will be saved intto <code>build\/app<\/code>. Please note that <code>gulpfile.ts<\/code> is excluded from the compilation.<\/p>\n<pre class=\"brush:php\">{\r\n  \"compilerOptions\": {\r\n    \"outDir\": \"build\/app\",\r\n    \"target\": \"es5\",\r\n    \"module\": \"system\",\r\n    \"moduleResolution\": \"node\",\r\n    \"sourceMap\": true,\r\n    \"emitDecoratorMetadata\": true,\r\n    \"experimentalDecorators\": true,\r\n    \"removeComments\": false,\r\n    \"noImplicitAny\": false\r\n  },\r\n  \"exclude\": [\r\n    \"gulpfile.ts\",\r\n    \"node_modules\",\r\n    \"typings\/main\",\r\n    \"typings\/main.d.ts\"\r\n  ]\r\n}<\/pre>\n<p>Note: If you import your project to IDE (e.g. IntelliJ) let the IDE use this file too.<\/p>\n<h2>Typings &#8211; typings.json<\/h2>\n<p>To get started we need only one definition run the following command:<\/p>\n<pre class=\"brush:bash\">\r\ntypings install es6-shim \u2013ambient \u2013save\r\n<\/pre>\n<p>which will append the following content to <code>typings.json<\/code><\/p>\n<pre class=\"brush:php\">{\r\n  \"ambientDependencies\": {\r\n    \"es6-shim\": \"github:DefinitelyTyped\/DefinitelyTyped\/es6-shim\/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c\"\r\n  }\r\n}<\/pre>\n<p>Typings will be download to <code>typings<\/code> directory and they will be downloaded on <code>npm install<\/code>.<\/p>\n<h2>npm configuration &#8211; package.json<\/h2>\n<pre class=\"brush:php\">{\r\n  \"name\": \"angular2-typescript-gulp\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"Angular2 with TypeScript and Gulp QuickStart\",\r\n  \"scripts\": {\r\n    \"clean\": \"gulp clean\",\r\n    \"compile\": \"gulp compile\",\r\n    \"build\": \"gulp build\",\r\n    \"server\": \"lite-server\",\r\n    \"postinstall\": \"typings install\"\r\n  },\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https:\/\/github.com\/kolorobot\/angular2-typescript-gulp.git\"\r\n  },\r\n  \"author\": \"Rafa\u0142 Borowiec\",\r\n  \"license\": \"MIT\",\r\n  \"bugs\": {\r\n    \"url\": \"https:\/\/github.com\/kolorobot\/angular2-typescript-gulp\/issues\"\r\n  },\r\n  \"dependencies\": {\r\n    \"angular2\": \"2.0.0-beta.7\",\r\n    \"systemjs\": \"0.19.22\",\r\n    \"es6-promise\": \"^3.0.2\",\r\n    \"es6-shim\": \"^0.33.3\",\r\n    \"reflect-metadata\": \"0.1.2\",\r\n    \"rxjs\": \"5.0.0-beta.2\",\r\n    \"zone.js\": \"0.5.15\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"concurrently\": \"^2.0.0\",\r\n    \"del\": \"^2.2.0\",\r\n    \"gulp\": \"^3.9.1\",\r\n    \"gulp-typescript\": \"^2.12.0\",\r\n    \"gulp-sourcemaps\": \"^1.6.0\",\r\n    \"lite-server\": \"^2.1.0\",\r\n    \"typescript\": \"^1.8.2\",\r\n    \"typings\": \"^0.6.8\"\r\n  }\r\n}<\/pre>\n<p>A word about scripts:<\/p>\n<ul>\n<li><code>clean<\/code> &#8211; removes <code>build<\/code> directory<\/li>\n<li><code>compile<\/code> &#8211; TypeScript compilation (with sourcemaps)<\/li>\n<li><code>build<\/code> &#8211; build the project<\/li>\n<li><code>server<\/code> &#8211; runs lite server which uses configuration from <code>bs-config.json<\/code><\/li>\n<\/ul>\n<h2>BrowserSync configuration (lite-server)<\/h2>\n<p>By default the content is served from the current directory so this needs to be changed. And since Lite Server uses BrowserSync it enough to provide <code>bs-config.json<\/code> that configures the server to serve content from <code>build<\/code> directory.<\/p>\n<pre class=\"brush:php\">{\r\n  \"port\": 8000,\r\n  \"files\": [\r\n    \"build\/**\/*.{html,htm,css,js}\"\r\n  ],\r\n  \"server\": {\r\n    \"baseDir\": \"build\"\r\n  }\r\n}<\/pre>\n<h2>Building the project with Gulp<\/h2>\n<p>To get started we need a task(s) that compiles TypeScript files, copies assets and dependencies to a <code>build<\/code> directory. Several tasks are needed in order to achieve it.<\/p>\n<pre class=\"brush:php\">var gulp = require(\"gulp\");\r\nvar del = require(\"del\");\r\nvar tsc = require(\"gulp-typescript\");\r\nvar sourcemaps  = require('gulp-sourcemaps');\r\nvar tsProject = tsc.createProject(\"tsconfig.json\");\r\n\r\n\/**\r\n * Remove build directory.\r\n *\/\r\ngulp.task('clean', (cb) =&gt; {\r\n    return del([\"build\"], cb);\r\n});\r\n\r\n\/**\r\n * Compile TypeScript sources and create sourcemaps in build directory.\r\n *\/\r\ngulp.task(\"compile\", () =&gt; {\r\n    var tsResult = gulp.src(\"src\/**\/*.ts\")\r\n        .pipe(sourcemaps.init())\r\n        .pipe(tsc(tsProject));\r\n    return tsResult.js\r\n        .pipe(sourcemaps.write(\".\"))\r\n        .pipe(gulp.dest(\"build\"));\r\n});\r\n\r\n\/**\r\n * Copy all resources that are not TypeScript files into build directory.\r\n *\/\r\ngulp.task(\"resources\", () =&gt; {\r\n    return gulp.src([\"src\/**\/*\", \"!**\/*.ts\"])\r\n        .pipe(gulp.dest(\"build\"))\r\n});\r\n\r\n\/**\r\n * Copy all required libraries into build directory.\r\n *\/\r\ngulp.task(\"libs\", () =&gt; {\r\n    return gulp.src([\r\n            'es6-shim\/es6-shim.min.js',\r\n            'systemjs\/dist\/system-polyfills.js',\r\n            'angular2\/bundles\/angular2-polyfills.js',\r\n            'systemjs\/dist\/system.src.js',\r\n            'rxjs\/bundles\/Rx.js',\r\n            'angular2\/bundles\/angular2.dev.js',\r\n            'angular2\/bundles\/router.dev.js'\r\n        ], {cwd: \"node_modules\/**\"}) \/* Glob required here. *\/\r\n        .pipe(gulp.dest(\"build\/lib\"));\r\n});\r\n\r\n\/**\r\n * Build the project.\r\n *\/\r\ngulp.task(\"build\", ['compile', 'resources', 'libs'], () =&gt; {\r\n    console.log(\"Building the project ...\")\r\n});<\/pre>\n<h2>Installing dependencies and checking the build<\/h2>\n<p>It is a high time to install all dependencies. Run:<\/p>\n<pre class=\"brush:bash\">\r\nnpm install\r\n<\/pre>\n<p><code>node_modules<\/code> and <code>typings<\/code> directories should be created during the install.<\/p>\n<p>Build the project:<\/p>\n<pre class=\"brush:bash\">\r\nnpm run clean &amp; npm run build\r\n<\/pre>\n<p><code>build<\/code> directory should be created during the build<\/p>\n<pre class=\"brush:php\">build                                \r\n|   index.html                       \r\n|                                    \r\n+---app                              \r\n|       app.component.js       \r\n|       app.component.js.map      \r\n|       app.html                     \r\n|       main.js                      \r\n|       main.js.map\r\n|                                    \r\n\\---lib                              \r\n    +---angular2                     \r\n    |   \\---bundles                  \r\n    |           angular2-polyfills.js\r\n    |           angular2.dev.js      \r\n    |           router.dev.js        \r\n    |                                \r\n    +---es6-shim                     \r\n    |       es6-shim.min.js          \r\n    |                                \r\n    +---rxjs                         \r\n    |   \\---bundles                  \r\n    |           Rx.js                \r\n    |                                \r\n    \\---systemjs                     \r\n        \\---dist                     \r\n                system-polyfills.js  \r\n                system.src.js<\/pre>\n<p>Run the server:<\/p>\n<pre class=\"brush:bash\">\r\nnpm run server\r\n<\/pre>\n<p>The empty page should be displayed in the browser.<\/p>\n<h2>Creating the application<\/h2>\n<p>All the basic <em>infrastucture<\/em> is in place. It is a high time to create the application.<\/p>\n<h3>src\/app\/app.component.ts<\/h3>\n<pre class=\"brush:php\">import {Component} from \"angular2\/core\";\r\nimport {OnInit} from \"angular2\/core\";\r\n\r\n@Component({\r\n    selector: \"app\",\r\n    templateUrl: \".\/app\/app.html\"\r\n})\r\nexport class AppComponent implements OnInit {\r\n\r\n    ngOnInit() {\r\n        console.log(\"Application component initialized ...\");\r\n    }\r\n}<\/pre>\n<h3>src\/app\/app.html<\/h3>\n<pre class=\"brush:php\">&lt;p&gt;Angular 2 is running ... &lt;\/p&gt;<\/pre>\n<h3>src\/app\/main.ts<\/h3>\n<pre class=\" brush:php\">import {bootstrap} from \"angular2\/platform\/browser\";\r\nimport {AppComponent} from \".\/app.component\";\r\n\r\nbootstrap(AppComponent);<\/pre>\n<h3>src\/index.html<\/h3>\n<p>The libraries are reference from <code>lib<\/code> directory that is created during the <code>build<\/code> task.<\/p>\n<pre class=\"brush:php\">&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;title&gt;Angular 2 TypeScript Gulp QuickStart&lt;\/title&gt;\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\r\n\r\n    &lt;!-- 1. Load libraries --&gt;\r\n    &lt;!-- IE required polyfills, in this exact order --&gt;\r\n    &lt;script src=\"lib\/es6-shim\/es6-shim.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"lib\/systemjs\/dist\/system-polyfills.js\"&gt;&lt;\/script&gt;\r\n\r\n    &lt;script src=\"lib\/angular2\/bundles\/angular2-polyfills.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"lib\/systemjs\/dist\/system.src.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"lib\/rxjs\/bundles\/Rx.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"lib\/angular2\/bundles\/angular2.dev.js\"&gt;&lt;\/script&gt;\r\n\r\n    &lt;!-- 2. Configure SystemJS --&gt;\r\n    &lt;script&gt;\r\n        System.config({\r\n            packages: {\r\n                app: {\r\n                    format: 'register',\r\n                    defaultExtension: 'js'\r\n                }\r\n            }\r\n        });\r\n        System.import('app\/main')\r\n                .then(null, console.error.bind(console));\r\n    &lt;\/script&gt;\r\n\r\n&lt;\/head&gt;\r\n\r\n&lt;!-- 3. Display the application --&gt;\r\n&lt;body&gt;\r\n&lt;app&gt;Loading...&lt;\/app&gt;\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/pre>\n<h2>Building and running<\/h2>\n<pre class=\"brush:bash\">\r\nnpm run clean &amp; npm run build\r\nnpm run server\r\n<\/pre>\n<h2>Notes on IntelliJ<\/h2>\n<p>IntelliJ handles the proposed setup with no problem. If TypeScript compiler is used in IntelliJ it should use the project\u2019s tsconfig.json. In such case, changes to ts files will be reflected in <code>build<\/code> directory immediately.<\/p>\n<h2>Source code<\/h2>\n<p><a href=\"https:\/\/github.com\/kolorobot\/angular2-typescript-gulp\">https:\/\/github.com\/kolorobot\/angular2-typescript-gulp<\/a><\/p>\n<h2>What\u2019s next?<\/h2>\n<p>Much more is needed to make real use of this project. Therefore more features will be added soon. If you have any suggestion, comment or add Github issues.<\/p>\n<h2>angular2-seed<\/h2>\n<p>If you need more mature starter, have a look at angular2-seed project <a href=\"https:\/\/github.com\/mgechev\/angular2-seed\">https:\/\/github.com\/mgechev\/angular2-seed<\/a>. angular2-seed uses gulp in much more advanced way and it is already supporting production and development build, unit and integration tests and many more.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/blog.codeleak.pl\/2016\/03\/quickstart-angular2-with-typescript-and.html\">Quickstart: Angular2 with TypeScript and Gulp<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Rafal Borowiec at the <a href=\"http:\/\/blog.codeleak.pl\/\">Codeleak.pl<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based architecture, new dependency injection or built-in modularity. In this step-by-step tutorial you will learn how how to get started with Angular2 with TypeScript and Gulp. Source code available on Github. &hellip;<\/p>\n","protected":false},"author":92,"featured_media":913,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[46,76],"class_list":["post-11301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular-js","tag-gulp","tag-typescript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Quickstart: Angular2 with TypeScript and Gulp - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based\" \/>\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\/quickstart-angular2-typescript-gulp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Quickstart: Angular2 with TypeScript and Gulp - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/\" \/>\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=\"2016-03-11T10:11:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-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=\"Rafal Borowiec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/kolorobot\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rafal Borowiec\" \/>\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\/quickstart-angular2-typescript-gulp\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/\"},\"author\":{\"name\":\"Rafal Borowiec\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c007f4fc5d9c752a9ae61115f9d1effd\"},\"headline\":\"Quickstart: Angular2 with TypeScript and Gulp\",\"datePublished\":\"2016-03-11T10:11:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/\"},\"wordCount\":720,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg\",\"keywords\":[\"Gulp\",\"TypeScript\"],\"articleSection\":[\"Angular.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/\",\"name\":\"Quickstart: Angular2 with TypeScript and Gulp - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg\",\"datePublished\":\"2016-03-11T10:11:49+00:00\",\"description\":\"Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#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\":\"Quickstart: Angular2 with TypeScript and Gulp\"}]},{\"@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\/c007f4fc5d9c752a9ae61115f9d1effd\",\"name\":\"Rafal Borowiec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"caption\":\"Rafal Borowiec\"},\"description\":\"Rafal is an IT specialist with about 8 years of commercial experience, specializing in software testing and quality assurance, software development, project management and team leadership. He is currently holding a position of a Team Leader at Goyello where he is mainly responsible for building and managing teams of professional developers and testers. He is also responsible for maintaining relations with customers and acquiring new ones, mainly through consultancy. He believes in Agile project management and he is a big fan of technology, especially Java related (but not limited too). He likes sharing knowledge about software development and practices, through his blog (blog.codeleak.pl) and Twitter (@kolorobot) but also on internal and external events like conferences or workshops.\",\"sameAs\":[\"http:\/\/blog.codeleak.pl\/\",\"http:\/\/pl.linkedin.com\/in\/borowiec\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/kolorobot\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/rafal-borowiec\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Quickstart: Angular2 with TypeScript and Gulp - Web Code Geeks - 2026","description":"Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based","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\/quickstart-angular2-typescript-gulp\/","og_locale":"en_US","og_type":"article","og_title":"Quickstart: Angular2 with TypeScript and Gulp - Web Code Geeks - 2026","og_description":"Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2016-03-11T10:11:49+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg","type":"image\/jpeg"}],"author":"Rafal Borowiec","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/kolorobot","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Rafal Borowiec","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/"},"author":{"name":"Rafal Borowiec","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c007f4fc5d9c752a9ae61115f9d1effd"},"headline":"Quickstart: Angular2 with TypeScript and Gulp","datePublished":"2016-03-11T10:11:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/"},"wordCount":720,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg","keywords":["Gulp","TypeScript"],"articleSection":["Angular.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/","name":"Quickstart: Angular2 with TypeScript and Gulp - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg","datePublished":"2016-03-11T10:11:49+00:00","description":"Angular2 is around the corner. The new version of the framework is much simpler to learn thanks to easier and more concise concepts like component-based","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/gulpjs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/quickstart-angular2-typescript-gulp\/#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":"Quickstart: Angular2 with TypeScript and Gulp"}]},{"@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\/c007f4fc5d9c752a9ae61115f9d1effd","name":"Rafal Borowiec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","caption":"Rafal Borowiec"},"description":"Rafal is an IT specialist with about 8 years of commercial experience, specializing in software testing and quality assurance, software development, project management and team leadership. He is currently holding a position of a Team Leader at Goyello where he is mainly responsible for building and managing teams of professional developers and testers. He is also responsible for maintaining relations with customers and acquiring new ones, mainly through consultancy. He believes in Agile project management and he is a big fan of technology, especially Java related (but not limited too). He likes sharing knowledge about software development and practices, through his blog (blog.codeleak.pl) and Twitter (@kolorobot) but also on internal and external events like conferences or workshops.","sameAs":["http:\/\/blog.codeleak.pl\/","http:\/\/pl.linkedin.com\/in\/borowiec\/","https:\/\/x.com\/https:\/\/twitter.com\/kolorobot"],"url":"https:\/\/www.webcodegeeks.com\/author\/rafal-borowiec\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11301","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\/92"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=11301"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11301\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/913"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=11301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=11301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=11301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}