You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2021. It is now read-only.
I had some working code that showed up a UI correctly. But I had all my code in the main app.component.ts (including the html with member template).
Then I included routing (@angular/router": "3.0.0-alpha.8). I did pretty much the same code as in another app with routing. However, I get the error: 'No provider for RouterOutletMap!'.
On searching I found out another person had a misconfigured webpack. I'm using system.js and mine seems to be ok.
My angular2 version is: 2.0.0-rc.3
I used ng-cli to generate both the --mobile app and the components.
My main.ts looks like this:
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppComponent, environment } from './app/';
import { APP_SHELL_RUNTIME_PROVIDERS } from '@angular/app-shell';
import { APP_ROUTER_PROVIDERS } from './app/app.routes';
if (environment.production) {
enableProdMode();
}
bootstrap(AppComponent, [
APP_SHELL_RUNTIME_PROVIDERS,
APP_ROUTER_PROVIDERS
]);
My app.component.ts is:
import { Component } from '@angular/core';
import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';
import { Router, ROUTER_DIRECTIVES } from '@angular/router';
@Component({
moduleId: module.id,
selector: 'app-root',
template: `<router-outlet></router-outlet>`,
styles: [],
directives: [APP_SHELL_DIRECTIVES, ROUTER_DIRECTIVES]
})
export class AppComponent {
}