Ahmed Mohamed Ahmed Mohamed - 2 years ago 213
AngularJS Question

How to install Angular2 in MVC6 Project

I'm facing problem with ASP.NET5 MVC6 project. I have been create project that's using AngularJS to create Single Page Application. Now I want to install Angular 2 instead of AngularJS 1.

So what should I do to upgrade the project from normal AngularJS to Angular 2.

Answer Source

To get a basic application configured you need to include angular2 and configure system.js

Here is an example from the documentation (https://angular.io/docs/ts/latest/quickstart.html):

    <title>Angular 2 QuickStart</title>
    <script src="../node_modules/systemjs/dist/system.src.js"></script>
    <script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
        packages: {'app': {defaultExtension: 'js'}}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download