pro.mean pro.mean - 5 months ago 104
Node.js Question

angular2 quick start only showing Loading .. not the content of index.html

for the first time using angular2 , following the instruction from 5 minute Quickstart guide for angular 2.

everything is working good, means no error while run

npm start

npm start image

but when i open


it show Loading... text which is not expecting. according to this example content of index.html should reflects on this.

in console there is error :

EXCEPTION: TypeError: Cannot set property 'endSourceSpan' of null


import { bootstrap } from '@angular/platform-browser-dynamic';

import { AppComponent } from './app.component';



import { Component } from '@angular/core';

selector: 'my-app',
template: 'My first Angular 2 App</h1>'

export class AppComponent {}


<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">

<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<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>

<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
System.import('app').catch(function(err){ console.error(err); });

<!-- 3. Display the application -->

Kindly help me what is going wrong.


I think that you have a problem in the template of your main component. For example a HTML element that isn't correctly closed:

template : '<div</div>'

See this issue for more details:


The problem is that your h1 isn't correct (no begin element):

  selector: 'my-app',
  template: '<h1>My first Angular 2 App</h1>' // <------
export class AppComponent {}