I am facing an issue with systemjs while working with angular2.
index.html
System.config({
packages: {
'app': {
format: 'register',
defaultExtension: 'js'
},
'angular2': {
defaultExtension: 'js'
},
'rxjs': {
defaultExtension: 'js'
}
},
paths: {
'*': 'dist/*',
'app/*': 'dist/app/*',
'angular2/*': 'node_modules/angular2/*',
'rxjs/*': 'node_modules/rxjs/*'
}
});
System.import('app/main.js').then(null, console.error.bind(console));
app.js
import {NavbarComponent} from './components/navbar/navbar';
@Component({
selector: 'main-app',
templateUrl: './app/app.html',
directives: [RouterOutlet, NavbarComponent]
})
This is the structure:
https://i.sstatic.net/bkcow.png
When I run serve:
dev: {
port: 8080,
host: "127.0.0.1",
open: '/',
root: '.',
file: "index.html",
wait: 1000
},
All .js files are loaded with path
But templateUrl is loaded with path
How can I configure to load templateUrl with path similar to .js file ?