Skip to content Skip to sidebar Skip to footer

Angular 2 With Babel Es2015 Not Loading And No Error

I'm trying to use angular 2 with babel, grunt, browserify and ES2015 sources. I'm trying a very basic example of simply loading a component with its template into my document. The

Solution 1:

To make your Angular 2 application work you need to bootstrap your Angular app component.

Code

import { Component } from"@angular/core";
import { bootstrap } from'@angular/platform-browser-dynamic'; //added import@Component({
    selector: "my-app",
    template: "<p>It works!</p>"
})

exportclassAppComponent {

}

bootstrap(AppComponent); //bootstrap application here

Post a Comment for "Angular 2 With Babel Es2015 Not Loading And No Error"