Hernan
Hernan

Reputation: 1148

How to combine component relative paths and systemjs?

Component relative paths are a helpful tool. The reference example using module.id displayed in angular's webpage is for commonjs.

I'm using the angular2-express-starter package and i can't use component relative paths. It seems that this is because the starter pack uses systemjs.

Any solution?

Upvotes: 0

Views: 262

Answers (1)

Hernan
Hernan

Reputation: 1148

The solution, from this github issue:

declare var __moduleName: string;

@Component({
    selector: 'my-component',
    moduleId: __moduleName,
    templateUrl: './my.component.html'
})
export class MyComponent { }

Upvotes: 1

Related Questions