Ich habe eine einfache Methode, die ich am Ende auf eine andere Komponente umleiten möchte:
export class AddDisplay{
display: any;
addPairTo(name: string, pairTo: string){
this.display = {};
this.display.name = name;
this.display.pairTo = pairTo;
}
}
Was ich tun möchte, ist am Ende der Methode eine Umleitung zu einer anderen Komponente:
export class AddDisplay{
display: any;
addPairTo(name: string, pairTo: string){
this.display = {};
this.display.name = name;
this.display.pairTo = pairTo;
this.redirectTo('foo');
}
}
Wie erreiche ich dies in Angular 2?