This post is about how to use Angular 4 with ASP.NET MVC5. In one of my existing projects we were using Angular 1.x, due to some plugin compatibility issues, we had to migrate to latest version of Angular. We couldn’t find any good article which talks about development and deployment aspects of Angular 4 with ASP.NET MVC.
First you need to create ASP.NET MVC project.
ng new Hellow Angula and then press enter to install project successfull created project and next step opne visaul studion 2015 next stop open visaul studio and next step open heloAngular app Unlike earlier versions of Angular, you need to reference the generated files with Angular CLI. You can generate the build files using ng build command. Before executing the ng build command, you need to configure your output folder, the scripts will be generated to the configured folder, by default it will be dist. I am configuring it to ../Bundles folder. open .angular-cli.json file and change "outdir":".../Bundles", Next you need to run ng build command. Once you run the command, it will generate required files to the bundles folder.
Unlike earlier versions of Angular, you need to reference the generated files with Angular CLI.
You can generate the build files using ng build command.
ng build
Before executing the ng build command, you need to configure your output folder, the scripts will be generated to the configured folder,
by default it will be dist. I am configuring it to ../Bundles folder. open .angular-cli.json file and change "outdir":".../Bundles",
dist
../Bundles