Home Angular 2 with .NET MVC
Reply: 0

Angular 2 with .NET MVC

santosh kumar
1#
santosh kumar Published in 2018-02-14 05:48:41Z

I am trying to integrate Angular into existing .NET MVC project. I have not made any changes in default route.config file because if I make changes as :

routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }
        ); 

To...

routes.MapRoute(
            name: "Default",
            url: "{*anything}",
            defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }
        );

The above does not work either and return error as "No route in the route table matches the supplied values"

Adding the required folder structure, config files, and other required files results in "Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:51822/Home/systemjs-angular-loader.js"

But I already have the systemjs-angular-loader.js in the project folder, views->shared and views->home folders. Please let me know what changes I can do to make it work.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.452363 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO