{"componentChunkName":"component---src-templates-handbook-tsx","path":"/docs/handbook/asp-net-core.html","result":{"data":{"allSitePage":{"nodes":[{"path":"/dev-404-page/"},{"path":"/docs/handbook/advanced-types.html"},{"path":"/docs/handbook/basic-types.html"},{"path":"/docs/handbook/classes.html"},{"path":"/docs/handbook/compiler-options-in-msbuild.html"},{"path":"/docs/handbook/compiler-options.html"},{"path":"/docs/handbook/configuring-watch.html"},{"path":"/docs/handbook/declaration-merging.html"},{"path":"/docs/handbook/decorators.html"},{"path":"/docs/handbook/enums.html"},{"path":"/docs/handbook/functions.html"},{"path":"/docs/handbook/generics.html"},{"path":"/docs/handbook/integrating-with-build-tools.html"},{"path":"/docs/handbook/interfaces.html"},{"path":"/docs/handbook/iterators-and-generators.html"},{"path":"/docs/handbook/jsdoc-supported-types.html"},{"path":"/docs/handbook/jsx.html"},{"path":"/docs/handbook/literal-types.html"},{"path":"/docs/handbook/mixins.html"},{"path":"/docs/handbook/module-resolution.html"},{"path":"/docs/handbook/modules.html"},{"path":"/docs/handbook/namespaces-and-modules.html"},{"path":"/docs/handbook/namespaces.html"},{"path":"/docs/handbook/nightly-builds.html"},{"path":"/docs/handbook/project-references.html"},{"path":"/docs/handbook/symbols.html"},{"path":"/docs/handbook/"},{"path":"/docs/handbook/triple-slash-directives.html"},{"path":"/docs/handbook/type-checking-javascript-files.html"},{"path":"/docs/handbook/type-compatibility.html"},{"path":"/docs/handbook/type-inference.html"},{"path":"/docs/handbook/unions-and-intersections.html"},{"path":"/docs/handbook/utility-types.html"},{"path":"/docs/handbook/variable-declarations.html"},{"path":"/docs/handbook/writing-declaration-files.html"},{"path":"/docs/handbook/declaration-files/by-example.html"},{"path":"/docs/handbook/declaration-files/consumption.html"},{"path":"/docs/handbook/declaration-files/deep-dive.html"},{"path":"/docs/handbook/declaration-files/do-s-and-don-ts.html"},{"path":"/docs/handbook/declaration-files/introduction.html"},{"path":"/docs/handbook/declaration-files/library-structures.html"},{"path":"/docs/handbook/declaration-files/publishing.html"},{"path":"/docs/handbook/declaration-files/templates.html"},{"path":"/docs/handbook/release-notes/typescript-1-1.html"},{"path":"/docs/handbook/release-notes/typescript-1-3.html"},{"path":"/docs/handbook/release-notes/typescript-1-4.html"},{"path":"/docs/handbook/release-notes/typescript-1-5.html"},{"path":"/docs/handbook/release-notes/typescript-1-6.html"},{"path":"/docs/handbook/release-notes/typescript-1-7.html"},{"path":"/docs/handbook/release-notes/typescript-1-8.html"},{"path":"/docs/handbook/release-notes/typescript-2-0.html"},{"path":"/docs/handbook/release-notes/typescript-2-2.html"},{"path":"/docs/handbook/release-notes/typescript-2-1.html"},{"path":"/docs/handbook/release-notes/typescript-2-3.html"},{"path":"/docs/handbook/release-notes/typescript-2-4.html"},{"path":"/docs/handbook/release-notes/typescript-2-5.html"},{"path":"/docs/handbook/release-notes/typescript-2-6.html"},{"path":"/docs/handbook/release-notes/typescript-2-7.html"},{"path":"/docs/handbook/release-notes/typescript-2-8.html"},{"path":"/docs/handbook/release-notes/typescript-2-9.html"},{"path":"/docs/handbook/release-notes/typescript-3-0.html"},{"path":"/docs/handbook/release-notes/typescript-3-1.html"},{"path":"/docs/handbook/release-notes/typescript-3-2.html"},{"path":"/docs/handbook/release-notes/typescript-3-3.html"},{"path":"/docs/handbook/release-notes/typescript-3-4.html"},{"path":"/docs/handbook/release-notes/typescript-3-5.html"},{"path":"/docs/handbook/release-notes/typescript-3-6.html"},{"path":"/docs/handbook/release-notes/typescript-3-7.html"},{"path":"/docs/handbook/release-notes/typescript-3-8.html"},{"path":"/docs/handbook/asp-net-core.html"},{"path":"/docs/handbook/angular.html"},{"path":"/docs/handbook/dom-manipulation.html"},{"path":"/docs/handbook/gulp.html"},{"path":"/docs/handbook/migrating-from-javascript.html"},{"path":"/docs/handbook/react-&-webpack.html"},{"path":"/docs/handbook/react.html"},{"path":"/docs/handbook/typescript-in-5-minutes-func.html"},{"path":"/docs/handbook/typescript-in-5-minutes.html"},{"path":"/docs/handbook/typescript-in-5-minutes-oop.html"},{"path":"/docs/handbook/typescript-from-scratch.html"},{"path":"/docs/handbook/typescript-tooling-in-5-minutes.html"},{"path":"/docs/handbook/tsconfig-json.html"},{"path":"/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/global-plugin-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/global-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-class-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-function-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-plugin-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-d-ts.html"},{"path":"/docs/handbook/release-notes/overview.html"},{"path":"/tsconfig"},{"path":"/en/tsconfig"},{"path":"/ja/tsconfig"},{"path":"/vo/tsconfig"},{"path":"/play"},{"path":"/en/play"},{"path":"/es/play"},{"path":"/vo/play"},{"path":"/zh/play"},{"path":"/ja/play"},{"path":"/play/3-7/fixits/big-number-literals.ts"},{"path":"/play/3-7/fixits/const-to-let.ts"},{"path":"/play/3-7/fixits/infer-from-usage-changes.ts"},{"path":"/play/3-7/syntax-and-messaging/flattened-error-reporting.ts"},{"path":"/play/3-7/syntax-and-messaging/nullish-coalescing.ts"},{"path":"/play/3-7/syntax-and-messaging/optional-chaining.ts"},{"path":"/play/3-7/types-and-code-flow/assertion-functions.ts"},{"path":"/play/3-7/types-and-code-flow/recursive-type-references.ts"},{"path":"/play/3-7/types-and-code-flow/uncalled-function-checks.ts"},{"path":"/play/3-8/breaking-changes/checking-unions-with-index-signatures.ts"},{"path":"/play/3-8/jsdoc-improvements/accessibility-modifiers.js"},{"path":"/play/3-8/syntax-and-messaging/export-modules-from.ts"},{"path":"/play/3-8/syntax-and-messaging/private-class-fields.ts"},{"path":"/play/javascript/external-apis/typescript-with-deno.ts"},{"path":"/play/javascript/external-apis/typescript-with-node.js"},{"path":"/play/javascript/external-apis/typescript-with-web.js"},{"path":"/play/javascript/external-apis/typescript-with-webgl.js"},{"path":"/play/javascript/functions-with-javascript/function-chaining.ts"},{"path":"/play/javascript/functions-with-javascript/generic-functions.ts"},{"path":"/play/javascript/functions-with-javascript/typing-functions.ts"},{"path":"/play/javascript/helping-with-javascript/errors.ts"},{"path":"/play/javascript/helping-with-javascript/quick-fixes.ts"},{"path":"/play/javascript/javascript-essentials/code-flow.ts"},{"path":"/play/javascript/javascript-essentials/functions.ts"},{"path":"/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/play/javascript/modern-javascript/async-await.ts"},{"path":"/play/javascript/modern-javascript/immutability.ts"},{"path":"/play/javascript/modern-javascript/import-export.ts"},{"path":"/play/javascript/modern-javascript/jsdoc-support.js"},{"path":"/play/javascript/working-with-classes/classes-101.ts"},{"path":"/play/javascript/working-with-classes/generic-classes.ts"},{"path":"/play/javascript/working-with-classes/mixins.ts"},{"path":"/play/javascript/working-with-classes/this.ts"},{"path":"/play/playground/config/javascript-playgrounds.js"},{"path":"/play/playground/config/new-compiler-defaults.ts"},{"path":"/play/playground/language/automatic-type-acquisition.ts"},{"path":"/play/playground/language/fixits.ts"},{"path":"/play/playground/tooling/mobile-support.ts"},{"path":"/play/playground/tooling/sharable-urls.ts"},{"path":"/play/playground/tooling/typescript-versions.ts"},{"path":"/play/typescript/language/soundness.ts"},{"path":"/play/typescript/language/structural-typing.ts"},{"path":"/play/typescript/language/type-guards.ts"},{"path":"/play/typescript/language/type-widening-and-narrowing.ts"},{"path":"/play/typescript/language-extensions/enums.ts"},{"path":"/play/typescript/language-extensions/nominal-typing.ts"},{"path":"/play/typescript/language-extensions/types-vs-interfaces.ts"},{"path":"/play/typescript/meta-types/conditional-types.ts"},{"path":"/play/typescript/meta-types/discriminate-types.ts"},{"path":"/play/typescript/meta-types/indexed-types.ts"},{"path":"/play/typescript/meta-types/mapped-types.ts"},{"path":"/play/typescript/primitives/any.ts"},{"path":"/play/typescript/primitives/literals.ts"},{"path":"/play/typescript/primitives/union-and-intersection-types.ts"},{"path":"/play/typescript/primitives/unknown-and-never.ts"},{"path":"/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/play/typescript/type-primitives/nullable-types.ts"},{"path":"/play/typescript/type-primitives/tuples.ts"},{"path":"/es/play/javascript/external-apis/typescript-with-deno.ts"},{"path":"/es/play/javascript/external-apis/typescript-with-node.js"},{"path":"/es/play/javascript/external-apis/typescript-with-web.js"},{"path":"/es/play/javascript/functions-with-javascript/function-chaining.ts"},{"path":"/es/play/javascript/functions-with-javascript/generic-functions.ts"},{"path":"/es/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/es/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/es/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/es/play/typescript/type-primitives/nullable-types.ts"},{"path":"/es/play/typescript/type-primitives/tuples.ts"},{"path":"/ja/play/typescript/language-extensions/enums.ts"},{"path":"/ja/play/typescript/language-extensions/nominal-typing.ts"},{"path":"/ja/play/typescript/language-extensions/types-vs-interfaces.ts"},{"path":"/ja/play/typescript/primitives/any.ts"},{"path":"/ja/play/typescript/primitives/literals.ts"},{"path":"/ja/play/typescript/primitives/union-and-intersection-types.ts"},{"path":"/ja/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/vo/play/javascript/javascript-essentials/code-flow.ts"},{"path":"/vo/play/javascript/javascript-essentials/functions.ts"},{"path":"/vo/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/vo/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/zh/play/javascript/external-apis/typescript-with-deno.ts"},{"path":"/zh/play/javascript/external-apis/typescript-with-node.js"},{"path":"/zh/play/javascript/external-apis/typescript-with-web.js"},{"path":"/zh/play/javascript/external-apis/typescript-with-webgl.js"},{"path":"/zh/play/javascript/functions-with-javascript/function-chaining.ts"},{"path":"/zh/play/javascript/functions-with-javascript/generic-functions.ts"},{"path":"/zh/play/javascript/functions-with-javascript/typing-functions.ts"},{"path":"/zh/play/javascript/helping-with-javascript/errors.ts"},{"path":"/zh/play/javascript/helping-with-javascript/quick-fixes.ts"},{"path":"/zh/play/javascript/javascript-essentials/code-flow.ts"},{"path":"/zh/play/javascript/javascript-essentials/functions.ts"},{"path":"/zh/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/zh/play/javascript/modern-javascript/import-export.ts"},{"path":"/zh/play/javascript/modern-javascript/jsdoc-support.js"},{"path":"/zh/play/javascript/working-with-classes/classes-101.ts"},{"path":"/zh/play/javascript/working-with-classes/generic-classes.ts"},{"path":"/zh/play/javascript/working-with-classes/mixins.ts"},{"path":"/zh/play/javascript/working-with-classes/this.ts"},{"path":"/zh/play/playground/config/javascript-playgrounds.js"},{"path":"/zh/play/playground/config/new-compiler-defaults.ts"},{"path":"/zh/play/playground/language/automatic-type-acquisition.ts"},{"path":"/zh/play/playground/language/fixits.ts"},{"path":"/zh/play/playground/tooling/mobile-support.ts"},{"path":"/zh/play/playground/tooling/sharable-urls.ts"},{"path":"/zh/play/playground/tooling/typescript-versions.ts"},{"path":"/zh/play/typescript/language/soundness.ts"},{"path":"/zh/play/typescript/language/structural-typing.ts"},{"path":"/zh/play/typescript/language/type-guards.ts"},{"path":"/zh/play/typescript/language/type-widening-and-narrowing.ts"},{"path":"/zh/play/typescript/language-extensions/enums.ts"},{"path":"/zh/play/typescript/language-extensions/nominal-typing.ts"},{"path":"/zh/play/typescript/language-extensions/types-vs-interfaces.ts"},{"path":"/zh/play/typescript/meta-types/conditional-types.ts"},{"path":"/zh/play/typescript/meta-types/discriminate-types.ts"},{"path":"/zh/play/typescript/meta-types/indexed-types.ts"},{"path":"/zh/play/typescript/meta-types/mapped-types.ts"},{"path":"/zh/play/typescript/primitives/any.ts"},{"path":"/zh/play/typescript/primitives/literals.ts"},{"path":"/zh/play/typescript/primitives/union-and-intersection-types.ts"},{"path":"/zh/play/typescript/primitives/unknown-and-never.ts"},{"path":"/zh/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/zh/play/typescript/type-primitives/nullable-types.ts"},{"path":"/zh/play/typescript/type-primitives/tuples.ts"},{"path":"/zh/play/javascript/modern-javascript/immutability.ts"},{"path":"/zh/play/javascript/modern-javascript/async-await.ts"},{"path":"/zh/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/community"},{"path":"/es/community"},{"path":"/ja/community"},{"path":"/vo/community"},{"path":"/zh/community"},{"path":"/download"},{"path":"/es/download"},{"path":"/ja/download"},{"path":"/vo/download"},{"path":"/zh/download"},{"path":"/empty"},{"path":"/es/empty"},{"path":"/ja/empty"},{"path":"/vo/empty"},{"path":"/zh/empty"},{"path":"/"},{"path":"/es/"},{"path":"/ja/"},{"path":"/vo/"},{"path":"/zh/"},{"path":"/tools"},{"path":"/es/tools"},{"path":"/ja/tools"},{"path":"/vo/tools"},{"path":"/zh/tools"},{"path":"/why-create-typescript"},{"path":"/es/why-create-typescript"},{"path":"/ja/why-create-typescript"},{"path":"/vo/why-create-typescript"},{"path":"/zh/why-create-typescript"},{"path":"/docs/home"},{"path":"/es/docs/home"},{"path":"/ja/docs/home"},{"path":"/vo/docs/home"},{"path":"/zh/docs/home"},{"path":"/dev/playground-plugins/"},{"path":"/dev/sandbox/"},{"path":"/dev/twoslash/"},{"path":"/dev/typescript-vfs/"}]},"markdownRemark":{"id":"9b022709-7d0a-59bb-94a3-9d3635b9c46e","excerpt":"Setup Install ASP.NET Core and TypeScript First, install ASP.NET Core if you need it. This quick-start guide requires Visual Studio 2015 or 2017. Next, if your…","html":"<h1 id=\"setup\" style=\"position:relative;\"><a href=\"#setup\" aria-label=\"setup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup</h1>\n<h2 id=\"install-aspnet-core-and-typescript\" style=\"position:relative;\"><a href=\"#install-aspnet-core-and-typescript\" aria-label=\"install aspnet core and typescript permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install ASP.NET Core and TypeScript</h2>\n<p>First, <a href=\"https://get.asp.net\">install ASP.NET Core</a> if you need it. This quick-start guide requires Visual Studio 2015 or 2017.</p>\n<p>Next, if your version of Visual Studio does not already have the latest TypeScript, you can <a href=\"http://www.microsoft.com/en-us/download/details.aspx?id=48593\">install it</a>.</p>\n<h2 id=\"create-a-new-project\" style=\"position:relative;\"><a href=\"#create-a-new-project\" aria-label=\"create a new project permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create a new project</h2>\n<ol>\n<li>Choose <strong>File</strong></li>\n<li>Choose <strong>New Project</strong> (Ctrl + Shift + N)</li>\n<li>Choose <strong>Visual C#</strong></li>\n<li>\n<p>For VS2015, choose <strong>ASP.NET Web Application</strong> > <strong>ASP.NET 5 Empty</strong>, and let’s uncheck “Host in the cloud” since we’re going to run this locally.</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/new-asp-project-empty.png\" alt=\"Use empty template\"></p>\n<p>For VS2017, choose <strong>ASP.NET Core Web Application (.NET Core)</strong> > <strong>ASP.NET Core 1.1 Empty</strong> instead.</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/new-asp-project-empty-17.PNG\" alt=\"Use empty template VS2017\"></p>\n</li>\n</ol>\n<p>Run the application and make sure that it works.</p>\n<h2 id=\"set-up-the-server\" style=\"position:relative;\"><a href=\"#set-up-the-server\" aria-label=\"set up the server permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set up the server</h2>\n<h3 id=\"vs2015\" style=\"position:relative;\"><a href=\"#vs2015\" aria-label=\"vs2015 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>VS2015</h3>\n<p>In <code>project.json</code> add another entry in <code>\"dependencies\"</code>:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #A31515\">\"Microsoft.AspNet.StaticFiles\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"1.0.0-rc1-final\"</span></code></div></pre>\n<p>The resulting dependencies should look like this:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #000000\">  </span><span style=\"color: #A31515\">\"dependencies\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"Microsoft.AspNet.IISPlatformHandler\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"1.0.0-rc1-final\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"Microsoft.AspNet.Server.Kestrel\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"1.0.0-rc1-final\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"Microsoft.AspNet.StaticFiles\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"1.0.0-rc1-final\"</span>\n<span style=\"color: #000000\">  },</span></code></div></pre>\n<p>Replace the body of <code>Configure</code> in <code>Startup.cs</code> with</p>\n<pre><code class=\"language-cs\">public void Configure(IApplicationBuilder app)\n{\n    app.UseIISPlatformHandler();\n    app.UseDefaultFiles();\n    app.UseStaticFiles();\n}\n</code></pre>\n<h3 id=\"vs2017\" style=\"position:relative;\"><a href=\"#vs2017\" aria-label=\"vs2017 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>VS2017</h3>\n<p>Open <strong>Dependencies</strong> > <strong>Manage NuGet Packages</strong> > <strong>Browse</strong>. Search and install <code>Microsoft.AspNetCore.StaticFiles</code> 1.1.2:</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/install-nuget-packages.png\" alt=\"Install Microsoft.AspNetCore.StaticFiles\"></p>\n<p>Replace the body of <code>Configure</code> in <code>Startup.cs</code> with</p>\n<pre><code class=\"language-cs\">public void Configure(IApplicationBuilder app)\n{\n    app.UseDefaultFiles();\n    app.UseStaticFiles();\n}\n</code></pre>\n<p>You may need to restart VS for the red squiggly lines below <code>UseDefaultFiles</code> and <code>UseStaticFiles</code> to disappear.</p>\n<h1 id=\"add-typescript\" style=\"position:relative;\"><a href=\"#add-typescript\" aria-label=\"add typescript permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add TypeScript</h1>\n<p>The next step is to add a folder for TypeScript.</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/new-folder.png\" alt=\"Create new folder\"></p>\n<p>We’ll just call it <code>scripts</code>.</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/scripts-folder.png\" alt=\"scripts folder\"></p>\n<h2 id=\"add-typescript-code\" style=\"position:relative;\"><a href=\"#add-typescript-code\" aria-label=\"add typescript code permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add TypeScript code</h2>\n<p>Right click on <code>scripts</code> and click <strong>New Item</strong>.\nThen choose <strong>TypeScript File</strong> (it may be in the .NET Core section) and name the file <code>app.ts</code>.</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/new-item.png\" alt=\"New item\"></p>\n<h2 id=\"add-example-code\" style=\"position:relative;\"><a href=\"#add-example-code\" aria-label=\"add example code permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add example code</h2>\n<p>Type the following code into app.ts.</p>\n<pre class=\"shiki\"><div class=\"language-id\">ts</div><div class='code-container'><code><span style=\"color: #0000FF\">function</span><span style=\"color: #000000\"> sayHello() {</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0000FF\">const</span><span style=\"color: #000000\"> compiler = (document.getElementById(</span><span style=\"color: #A31515\">\"compiler\"</span><span style=\"color: #000000\">) </span><span style=\"color: #0000FF\">as</span><span style=\"color: #000000\"> HTMLInputElement)</span>\n<span style=\"color: #000000\">    .value;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0000FF\">const</span><span style=\"color: #000000\"> framework = (document.getElementById(</span><span style=\"color: #A31515\">\"framework\"</span><span style=\"color: #000000\">) </span><span style=\"color: #0000FF\">as</span><span style=\"color: #000000\"> HTMLInputElement)</span>\n<span style=\"color: #000000\">    .value;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0000FF\">return</span><span style=\"color: #000000\"> </span><span style=\"color: #A31515\">`Hello from </span><span style=\"color: #0000FF\">${</span><span style=\"color: #A31515\">compiler</span><span style=\"color: #0000FF\">}</span><span style=\"color: #A31515\"> and </span><span style=\"color: #0000FF\">${</span><span style=\"color: #A31515\">framework</span><span style=\"color: #0000FF\">}</span><span style=\"color: #A31515\">!`</span><span style=\"color: #000000\">;</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<h2 id=\"set-up-the-build\" style=\"position:relative;\"><a href=\"#set-up-the-build\" aria-label=\"set up the build permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set up the build</h2>\n<h3 id=\"configure-the-typescript-compiler\" style=\"position:relative;\"><a href=\"#configure-the-typescript-compiler\" aria-label=\"configure the typescript compiler permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configure the TypeScript compiler</h3>\n<p>First we need to tell TypeScript how to build.\nRight click on the scripts folder and click <strong>New Item</strong>.\nThen choose <strong>TypeScript Configuration File</strong> and use the default name <code>tsconfig.json</code>.</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/new-tsconfig.png\" alt=\"Create tsconfig.json\"></p>\n<p>Replace the default <code>tsconfig.json</code> with the following:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #000000\">{</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0451A5\">\"compilerOptions\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"noImplicitAny\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"noEmitOnError\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"sourceMap\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"target\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"es5\"</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0451A5\">\"files\"</span><span style=\"color: #000000\">: [</span><span style=\"color: #A31515\">\"./app.ts\"</span><span style=\"color: #000000\">],</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0451A5\">\"compileOnSave\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<p>This is similar to the default, with the following differences:</p>\n<ol>\n<li>It sets <code>\"noImplicitAny\": true</code>.</li>\n<li>It explicitly lists <code>\"files\"</code> instead of relying on <code>\"excludes\"</code>.</li>\n<li>It sets <code>\"compileOnSave\": true</code>.</li>\n</ol>\n<p><code>\"noImplicitAny\"</code> is good idea whenever you’re writing new code — you can make sure that you don’t write any untyped code by mistake.\n<code>\"compileOnSave\"</code> makes it easy to update your code in a running web app.</p>\n<h3 id=\"set-up-npm\" style=\"position:relative;\"><a href=\"#set-up-npm\" aria-label=\"set up npm permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set up npm</h3>\n<p>Now we need to set up npm so we can download JavaScript packages.\nRight click on the project and click <strong>New Item</strong>.\nThen choose <strong>npm Configuration File</strong> and use the default name <code>package.json</code>.\nInside <code>\"devDependencies\"</code> add “gulp” and “del”:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #A31515\">\"devDependencies\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"gulp\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"3.9.0\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"del\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"2.2.0\"</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<p>Visual Studio should start installing gulp and del as soon as you save the file.\nIf not, right-click package.json and then <strong>Restore Packages</strong>.</p>\n<h3 id=\"set-up-gulp\" style=\"position:relative;\"><a href=\"#set-up-gulp\" aria-label=\"set up gulp permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set up gulp</h3>\n<p>Finally, add a new JavaScript file named <code>gulpfile.js</code>.\nPut the following code inside:</p>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #008000\">/// &lt;binding AfterBuild='default' Clean='clean' /&gt;</span>\n<span style=\"color: #008000\">/*</span>\n<span style=\"color: #008000\">This file is the main entry point for defining Gulp tasks and using Gulp plugins.</span>\n<span style=\"color: #008000\">Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007</span>\n<span style=\"color: #008000\">*/</span>\n\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> gulp = require(</span><span style=\"color: #A31515\">\"gulp\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> del = require(</span><span style=\"color: #A31515\">\"del\"</span><span style=\"color: #000000\">);</span>\n\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> paths = {</span>\n<span style=\"color: #000000\">  scripts: [</span><span style=\"color: #A31515\">\"scripts/**/*.js\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"scripts/**/*.ts\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"scripts/**/*.map\"</span><span style=\"color: #000000\">]</span>\n<span style=\"color: #000000\">};</span>\n\n<span style=\"color: #000000\">gulp.task(</span><span style=\"color: #A31515\">\"clean\"</span><span style=\"color: #000000\">, </span><span style=\"color: #0000FF\">function</span><span style=\"color: #000000\">() {</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0000FF\">return</span><span style=\"color: #000000\"> del([</span><span style=\"color: #A31515\">\"wwwroot/scripts/**/*\"</span><span style=\"color: #000000\">]);</span>\n<span style=\"color: #000000\">});</span>\n\n<span style=\"color: #000000\">gulp.task(</span><span style=\"color: #A31515\">\"default\"</span><span style=\"color: #000000\">, </span><span style=\"color: #0000FF\">function</span><span style=\"color: #000000\">() {</span>\n<span style=\"color: #000000\">  gulp.src(paths.scripts).pipe(gulp.dest(</span><span style=\"color: #A31515\">\"wwwroot/scripts\"</span><span style=\"color: #000000\">));</span>\n<span style=\"color: #000000\">});</span></code></div></pre>\n<p>The first line tells Visual Studio to run the task ‘default’ after the build finishes.\nIt will also run the ‘clean’ task when you ask Visual Studio to clean the build.</p>\n<p>Now right-click on <code>gulpfile.js</code> and click <strong>Task Runner Explorer</strong>.\nIf ‘default’ and ‘clean’ tasks don’t show up, refresh the explorer:</p>\n<p><img src=\"../../assets/images/tutorials/aspnet/task-runner-explorer.png\" alt=\"Refresh Task Runner Explorer\"></p>\n<h2 id=\"write-an-html-page\" style=\"position:relative;\"><a href=\"#write-an-html-page\" aria-label=\"write an html page permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Write an HTML page</h2>\n<p>Add a New Item named <code>index.html</code> inside <code>wwwroot</code>.\nUse the following code for <code>index.html</code>:</p>\n<pre class=\"shiki\"><div class=\"language-id\">html</div><div class='code-container'><code><span style=\"color: #800000\">&lt;!</span><span style=\"color: #000000\">DOCTYPE html</span><span style=\"color: #800000\">&gt;</span>\n<span style=\"color: #800000\">&lt;html&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;head&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;meta</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">charset</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"utf-8\"</span><span style=\"color: #800000\"> /&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;script</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">src</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"scripts/app.js\"</span><span style=\"color: #800000\">&gt;&lt;/script&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;title&gt;&lt;/title&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;/head&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;body&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;div</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">id</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"message\"</span><span style=\"color: #800000\">&gt;&lt;/div&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;div&gt;</span>\n<span style=\"color: #000000\">      Compiler:</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #800000\">&lt;input</span>\n<span style=\"color: #000000\">        </span><span style=\"color: #DC0000\">id</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"compiler\"</span>\n<span style=\"color: #000000\">        </span><span style=\"color: #DC0000\">value</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"TypeScript\"</span>\n<span style=\"color: #000000\">        </span><span style=\"color: #DC0000\">onkeyup</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"document.getElementById('message').innerText = sayHello()\"</span>\n<span style=\"color: #000000\">     </span><span style=\"color: #800000\"> /&gt;&lt;br /&gt;</span>\n<span style=\"color: #000000\">      Framework:</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #800000\">&lt;input</span>\n<span style=\"color: #000000\">        </span><span style=\"color: #DC0000\">id</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"framework\"</span>\n<span style=\"color: #000000\">        </span><span style=\"color: #DC0000\">value</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"ASP.NET\"</span>\n<span style=\"color: #000000\">        </span><span style=\"color: #DC0000\">onkeyup</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"document.getElementById('message').innerText = sayHello()\"</span>\n<span style=\"color: #000000\">     </span><span style=\"color: #800000\"> /&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;/div&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;/body&gt;</span>\n<span style=\"color: #800000\">&lt;/html&gt;</span></code></div></pre>\n<h2 id=\"test\" style=\"position:relative;\"><a href=\"#test\" aria-label=\"test permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Test</h2>\n<ol>\n<li>Run the project.</li>\n<li>You should see a message when you type in the input boxes:</li>\n</ol>\n<p><img src=\"../../assets/images/tutorials/aspnet/running-demo.png\" alt=\"Picture of running demo\"></p>\n<h2 id=\"debug\" style=\"position:relative;\"><a href=\"#debug\" aria-label=\"debug permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Debug</h2>\n<ol>\n<li>In Edge, press F12 and click the <strong>Debugger</strong> tab.</li>\n<li>Look in the first localhost folder, then scripts/app.ts</li>\n<li>Put a breakpoint on the line with <code>return</code>.</li>\n<li>Type in the boxes and confirm that the breakpoint hits in TypeScript code and that inspection works correctly.</li>\n</ol>\n<p><img src=\"../../assets/images/tutorials/aspnet/paused-demo.png\" alt=\"Demo paused on breakpoint\"></p>\n<p>That’s all you need to know to include basic TypeScript in your ASP.NET project.\nNext we’ll include Angular and write a simple Angular app.</p>\n<h1 id=\"add-angular-2\" style=\"position:relative;\"><a href=\"#add-angular-2\" aria-label=\"add angular 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add Angular 2</h1>\n<h2 id=\"add-npm-dependencies\" style=\"position:relative;\"><a href=\"#add-npm-dependencies\" aria-label=\"add npm dependencies permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add npm dependencies</h2>\n<p>Add Angular 2 and SystemJS to <code>dependencies</code> in <code>package.json</code>.</p>\n<p>For VS2015, the new <code>dependencies</code> list:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #000000\">  </span><span style=\"color: #A31515\">\"dependencies\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"angular2\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"2.0.0-beta.11\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"systemjs\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"0.19.24\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"gulp\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"3.9.0\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"del\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"2.2.0\"</span>\n<span style=\"color: #000000\">  },</span></code></div></pre>\n<p>For VS2017, due to the deprecation of peer dependencies in npm@3, we need to list Angular 2’s peer dependencies directly as dependencies as well:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #000000\">  </span><span style=\"color: #A31515\">\"dependencies\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"angular2\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"2.0.0-beta.11\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"reflect-metadata\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"0.1.2\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"rxjs\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"5.0.0-beta.2\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"zone.js\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"^0.6.4\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"systemjs\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"0.19.24\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"gulp\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"3.9.0\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"del\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"2.2.0\"</span>\n<span style=\"color: #000000\">  },</span></code></div></pre>\n<h2 id=\"update-tsconfigjson\" style=\"position:relative;\"><a href=\"#update-tsconfigjson\" aria-label=\"update tsconfigjson permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Update tsconfig.json</h2>\n<p>Now that Angular 2 and its dependencies are installed, we need to enable TypeScript’s experimental support for decorators.\nWe also need to add declarations for ES2015, since Angular uses core-js for things like <code>Promise</code>.\nIn the future decorators will be the default and these settings will not be needed.</p>\n<p>Add <code>\"experimentalDecorators\": true, \"emitDecoratorMetadata\": true</code> to the <code>\"compilerOptions\"</code> section.\nNext, add <code>\"lib\": [\"es2015\", \"es5\", \"dom\"]</code> to <code>\"compilerOptions\"</code> as well to bring in declarations from ES2015.\nFinally, we’ll need to add a new entry in <code>\"files\"</code> for another file, <code>\"./model.ts\"</code>, which we’ll create.\nOur tsconfig should now look like this:</p>\n<pre class=\"shiki\"><div class=\"language-id\">json</div><div class='code-container'><code><span style=\"color: #000000\">{</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0451A5\">\"compilerOptions\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"noImplicitAny\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"noEmitOnError\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"sourceMap\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"experimentalDecorators\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"emitDecoratorMetadata\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"target\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"es5\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0451A5\">\"lib\"</span><span style=\"color: #000000\">: [</span><span style=\"color: #A31515\">\"es2015\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"es5\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"dom\"</span><span style=\"color: #000000\">]</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0451A5\">\"files\"</span><span style=\"color: #000000\">: [</span><span style=\"color: #A31515\">\"./app.ts\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"./model.ts\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"./main.ts\"</span><span style=\"color: #000000\">],</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0451A5\">\"compileOnSave\"</span><span style=\"color: #000000\">: </span><span style=\"color: #0000FF\">true</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<h2 id=\"add-angular-to-the-gulp-build\" style=\"position:relative;\"><a href=\"#add-angular-to-the-gulp-build\" aria-label=\"add angular to the gulp build permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add Angular to the gulp build</h2>\n<p>Finally, we need to make sure that the Angular files are copied as part of the build.\nWe need to add:</p>\n<ol>\n<li>The paths to the library files.</li>\n<li>Add a <code>lib</code> task to pipe the files to <code>wwwroot</code>.</li>\n<li>Add a dependency on <code>lib</code> to the <code>default</code> task.</li>\n</ol>\n<p>The updated <code>gulpfile.js</code> should look like this:</p>\n<pre class=\"shiki\"><div class=\"language-id\">xml</div><div class='code-container'><code><span style=\"color: #000000\">/// </span><span style=\"color: #800000\">&lt;binding</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">AfterBuild</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">'default'</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">Clean</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">'clean'</span><span style=\"color: #000000\"> </span><span style=\"color: #800000\">/&gt;</span>\n<span style=\"color: #000000\">/*</span>\n<span style=\"color: #000000\">This file is the main entry point for defining Gulp tasks and using Gulp plugins.</span>\n<span style=\"color: #000000\">Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007</span>\n<span style=\"color: #000000\">*/</span>\n\n<span style=\"color: #000000\">var gulp = require('gulp');</span>\n<span style=\"color: #000000\">var del = require('del');</span>\n\n<span style=\"color: #000000\">var paths = {</span>\n<span style=\"color: #000000\">    scripts: ['scripts/**/*.js', 'scripts/**/*.ts', 'scripts/**/*.map'],</span>\n<span style=\"color: #000000\">    libs: ['node_modules/angular2/bundles/angular2.js',</span>\n<span style=\"color: #000000\">           'node_modules/angular2/bundles/angular2-polyfills.js',</span>\n<span style=\"color: #000000\">           'node_modules/systemjs/dist/system.src.js',</span>\n<span style=\"color: #000000\">           'node_modules/rxjs/bundles/Rx.js']</span>\n<span style=\"color: #000000\">};</span>\n\n<span style=\"color: #000000\">gulp.task('lib', function () {</span>\n<span style=\"color: #000000\">    gulp.src(paths.libs).pipe(gulp.dest('wwwroot/scripts/lib'));</span>\n<span style=\"color: #000000\">});</span>\n\n<span style=\"color: #000000\">gulp.task('clean', function () {</span>\n<span style=\"color: #000000\">    return del(['wwwroot/scripts/**/*']);</span>\n<span style=\"color: #000000\">});</span>\n\n<span style=\"color: #000000\">gulp.task('default', ['lib'], function () {</span>\n<span style=\"color: #000000\">    gulp.src(paths.scripts).pipe(gulp.dest('wwwroot/scripts'));</span>\n<span style=\"color: #000000\">});</span></code></div></pre>\n<p>Again, make sure that Task Runner Explorer sees the new <code>lib</code> task after you save the gulpfile.</p>\n<h2 id=\"write-a-simple-angular-app-in-typescript\" style=\"position:relative;\"><a href=\"#write-a-simple-angular-app-in-typescript\" aria-label=\"write a simple angular app in typescript permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Write a simple Angular app in TypeScript</h2>\n<p>First, change the code in <code>app.ts</code> to:</p>\n<pre class=\"shiki\"><div class=\"language-id\">ts</div><div class='code-container'><code><span style=\"color: #0000FF\">import</span><span style=\"color: #000000\"> { Component } </span><span style=\"color: #0000FF\">from</span><span style=\"color: #000000\"> </span><span style=\"color: #A31515\">\"angular2/core\"</span><span style=\"color: #000000\">;</span>\n<span style=\"color: #0000FF\">import</span><span style=\"color: #000000\"> { MyModel } </span><span style=\"color: #0000FF\">from</span><span style=\"color: #000000\"> </span><span style=\"color: #A31515\">\"./model\"</span><span style=\"color: #000000\">;</span>\n\n<span style=\"color: #000000\">@Component({</span>\n<span style=\"color: #000000\">  selector: </span><span style=\"color: #A31515\">`my-app`</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">  template: </span><span style=\"color: #A31515\">`</span>\n<span style=\"color: #A31515\">    &lt;div&gt;Hello from {{ getCompiler() }}&lt;/div&gt;</span>\n<span style=\"color: #A31515\">  `</span>\n<span style=\"color: #000000\">})</span>\n<span style=\"color: #0000FF\">export</span><span style=\"color: #000000\"> </span><span style=\"color: #0000FF\">class</span><span style=\"color: #000000\"> MyApp {</span>\n<span style=\"color: #000000\">  model = </span><span style=\"color: #0000FF\">new</span><span style=\"color: #000000\"> MyModel();</span>\n<span style=\"color: #000000\">  getCompiler() {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0000FF\">return</span><span style=\"color: #000000\"> </span><span style=\"color: #0000FF\">this</span><span style=\"color: #000000\">.model.compiler;</span>\n<span style=\"color: #000000\">  }</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<p>Then add another TypeScript file in <code>scripts</code> named <code>model.ts</code>:</p>\n<pre class=\"shiki\"><div class=\"language-id\">ts</div><div class='code-container'><code><span style=\"color: #0000FF\">export</span><span style=\"color: #000000\"> </span><span style=\"color: #0000FF\">class</span><span style=\"color: #000000\"> MyModel {</span>\n<span style=\"color: #000000\">  compiler = </span><span style=\"color: #A31515\">\"TypeScript\"</span><span style=\"color: #000000\">;</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<p>And then another TypeScript file in <code>scripts</code> named <code>main.ts</code>:</p>\n<pre class=\"shiki\"><div class=\"language-id\">ts</div><div class='code-container'><code><span style=\"color: #0000FF\">import</span><span style=\"color: #000000\"> { bootstrap } </span><span style=\"color: #0000FF\">from</span><span style=\"color: #000000\"> </span><span style=\"color: #A31515\">\"angular2/platform/browser\"</span><span style=\"color: #000000\">;</span>\n<span style=\"color: #0000FF\">import</span><span style=\"color: #000000\"> { MyApp } </span><span style=\"color: #0000FF\">from</span><span style=\"color: #000000\"> </span><span style=\"color: #A31515\">\"./app\"</span><span style=\"color: #000000\">;</span>\n<span style=\"color: #000000\">bootstrap(MyApp);</span></code></div></pre>\n<p>Finally, change the code in <code>index.html</code> to the following:</p>\n<pre class=\"shiki\"><div class=\"language-id\">html</div><div class='code-container'><code><span style=\"color: #800000\">&lt;!</span><span style=\"color: #000000\">DOCTYPE html</span><span style=\"color: #800000\">&gt;</span>\n<span style=\"color: #800000\">&lt;html&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;head&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;meta</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">charset</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"utf-8\"</span><span style=\"color: #800000\"> /&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;script</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">src</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"scripts/lib/angular2-polyfills.js\"</span><span style=\"color: #800000\">&gt;&lt;/script&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;script</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">src</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"scripts/lib/system.src.js\"</span><span style=\"color: #800000\">&gt;&lt;/script&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;script</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">src</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"scripts/lib/rx.js\"</span><span style=\"color: #800000\">&gt;&lt;/script&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;script</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">src</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"scripts/lib/angular2.js\"</span><span style=\"color: #800000\">&gt;&lt;/script&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;script&gt;</span>\n<span style=\"color: #000000\">      System.config({</span>\n<span style=\"color: #000000\">        packages: {</span>\n<span style=\"color: #000000\">          scripts: {</span>\n<span style=\"color: #000000\">            format: </span><span style=\"color: #A31515\">\"cjs\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">            defaultExtension: </span><span style=\"color: #A31515\">\"js\"</span>\n<span style=\"color: #000000\">          }</span>\n<span style=\"color: #000000\">        }</span>\n<span style=\"color: #000000\">      });</span>\n<span style=\"color: #000000\">      System.import(</span><span style=\"color: #A31515\">\"scripts/main\"</span><span style=\"color: #000000\">).then(</span><span style=\"color: #0000FF\">null</span><span style=\"color: #000000\">, console.error.bind(console));</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;/script&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;title&gt;&lt;/title&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;/head&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;body&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;my-app&gt;</span><span style=\"color: #000000\">Loading...</span><span style=\"color: #800000\">&lt;/my-app&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;/body&gt;</span>\n<span style=\"color: #800000\">&lt;/html&gt;</span></code></div></pre>\n<p>This loads the app.\nWhen you run the ASP.NET application you should see a div that says “Loading…” and then updates to say “Hello from TypeScript”.</p>","headings":[{"value":"Setup","depth":1},{"value":"Install ASP.NET Core and TypeScript","depth":2},{"value":"Create a new project","depth":2},{"value":"Set up the server","depth":2},{"value":"VS2015","depth":3},{"value":"VS2017","depth":3},{"value":"Add TypeScript","depth":1},{"value":"Add TypeScript code","depth":2},{"value":"Add example code","depth":2},{"value":"Set up the build","depth":2},{"value":"Configure the TypeScript compiler","depth":3},{"value":"Set up npm","depth":3},{"value":"Set up gulp","depth":3},{"value":"Write an HTML page","depth":2},{"value":"Test","depth":2},{"value":"Debug","depth":2},{"value":"Add Angular 2","depth":1},{"value":"Add npm dependencies","depth":2},{"value":"Update tsconfig.json","depth":2},{"value":"Add Angular to the gulp build","depth":2},{"value":"Write a simple Angular app in TypeScript","depth":2}],"frontmatter":{"permalink":"/docs/handbook/asp-net-core.html","title":"ASP.NET Core"}}},"pageContext":{"slug":"/docs/handbook/asp-net-core.html","isOldHandbook":true}}}