for the first time using angular2, following the instructions of the 5-minute quick start guide for angular 2.
everything works well, so there is no error starting npm start
npm start image
but when I open
local: 3000
it displays the text Loading ... which does not expect. according to this example, the contents of index.html should reflect this.
there is an error in the console:
EXCEPTION: TypeError: Cannot set property 'endSourceSpan' from null
main.ts
import { bootstrap } from '@angular/platform-browser-dynamic'; import { AppComponent } from './app.component'; bootstrap(AppComponent);
app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: 'My first Angular 2 App</h1>' }) export class AppComponent {}
index.html
<html> <head> <title>Angular 2 QuickStart</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> <script src="node_modules/es6-shim/es6-shim.min.js"></script> <script src="node_modules/zone.js/dist/zone.js"></script> <script src="node_modules/reflect-metadata/Reflect.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script> System.import('app').catch(function(err){ console.error(err); }); </script> </head> <body> <my-app>Loading...</my-app> </body> </html>
Please help me with what is going wrong.
source share