Angular – What is the meanings of module.id in component?

In an Angular app, I have seen that @Component has property moduleId. What does it mean? And when module.id is not defined anywhere, the app still works. How can it still work? @Component({ moduleId: module.id, selector: ‘ng-app’, templateUrl: ‘app.component.html’, styleUrls: [‘app.component.css’], directives: [AppComponent] }); 8 Answers 8

Angular no provider for NameService

I’ve got a problem loading a class into an Angular component. I’ve been trying to solve it for a long time; I’ve even tried joining it all in a single file. What I have is: Application.ts /// <reference path=”../typings/angular2/angular2.d.ts” /> import {Component,View,bootstrap,NgFor} from “angular2/angular2”; import {NameService} from “./services/NameService”; @Component({ selector:’my-app’, injectables: [NameService] }) @View({ template:'<h1>Hi … Read more