Answer the question
In order to leave comments, you need to log in
Why does routing not work, everything seems to be correct?
Plunker example:
embed.plnkr.co/sF9Use
plnkr.co/edit/sF9Use
Answer the question
In order to leave comments, you need to log in
The console shows you an error, is everything in order?
Try to add LocationStrategy initialization in main.ts
import {bootstrap} from 'angular2/platform/browser';
import {App} from './app';
import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {provide} from 'angular2/core';
bootstrap(App, [
ROUTER_PROVIDERS,
provide(LocationStrategy, { useClass: HashLocationStrategy })])
.catch(err => console.error(err));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question