angular.io has a setup for asp.net core: https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html.

However, I'd like to set it up for an asp.net mvc app. The Quick Start files are already there from the asp.net mvc template. These are the ones from the site:

app folder
styles.css
index.html
package.json
tsconfig.json

The contents of mine look exactly the same. I also added the app and e2e folders from https://github.com/angular/quickstart, which are referenced from the QuickStart.

I then added

<my-app>Loading AppComponent content here ...</my-app>

to Index.cshtml. I can compile and run the app without any errors. But I still see

Loading AppComponent content here ...

when the page renders instead of seeing the following:

Hello Angular

Which is what should appear. The angular.io plunkr verifies this: https://embed.plnkr.co/?show=preview&show=app%2Fapp.component.ts.

Microsoft.TypeScript.Compiler, Microsoft.TypeScript.MSBuild and TypeScript 2 are all installed.

This is just a basic, non modified asp.net mvc app to see if I can get Angular2 working.

The asp.net mvc template may have a different folder/file structure than the asp.net core. So I'm not sure how angular2 knows there is an app folder.

Any ideas why this might not be working?

Related posts

Recent Viewed