As I delve into learning Angular2, I encountered an issue. The initial run of my project was successful. However, when making changes according to the tutorial, none of the modifications were reflected when I run the project in any browser!
Here is a snippet from my "app.component.ts":
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
template: '<h1>Testing...</h1>'
})
export class AppComponent {
title = 'Tour of Heroes';
}
The above code displays fine in any browser, but when I switch to this:
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
template: '<h1>{{title}}</h1>'
})
export class AppComponent {
title = 'Tour of Heroes';
}
It still shows "Testing...". It should display "Tour of Heroes". Why is this happening?
All other files are identical to the tutorial!
Ps.: I have confirmed the installation of "node and npm"!
[User @PankajParkar mentioned the need for editing "System.config"] Here is the snippet from my index.html, similar to the tutorial in Angular2:
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main').then(null, console.error.bind(console));
</script>