Skip to content

Project setting up Angular with ASP.NET MVC using Visual Studio 2017

Notifications You must be signed in to change notification settings

itworld1st/Ng5Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update for Angular 6

Angular 6 now depends on TypeScript 2.7, RxJS 6.0.0 or higher.

Changes systemjs.config.js file by adding code as follows:

packages: {
      rxjs: {
        main: 'index.js',
        defaultExtension: 'js'
      },
      'rxjs/operators': {
        main: 'index.js',
        defaultExtension: 'js'
      }
    }

Configure IIS route rules

In App_Start/RouteConfig.cs file, change url as follows:

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

For using the Angular Router, In Views/Shared/_Layout.cshtml file, add a <base> element as the first child in the <head> tag.

<head>
    <base href="/">
</head>

About

Project setting up Angular with ASP.NET MVC using Visual Studio 2017

Resources

Stars

Watchers

Forks

Packages

No packages published