Reputation: 2480
First of all i am new to Angular 2 and i created new project using Angular cli tool.
I have pushed my code here (rather then pasting all files here):
https://github.com/tsingh38/Angular2
When i run ng serve then serve starts successfully but browser shows just "Loading".
As per my research so far, package.json and other files are perfectly fine. In case more info is required then i will answer.
Thanks.
Upvotes: 1
Views: 108
Reputation: 22882
Go to your src/index.html
file and change this:
<app-root>Loading...</app-root>
To this:
<my-app>Loading...</my-app>
Why? Because on your src/app/app.component.ts
your selector is my-app
:
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app works!';
}
Upvotes: 1