Angular Unit testing : Error: Cannot match any routes. URL Segment: 'home/advisor'

Discussão em 'Angular' iniciado por firasKoubaa, Março 2, 2025.

  1. firasKoubaa

    firasKoubaa Guest

    Am working on unit testing under my angular 4.0.0 app , some method in my real component is calling manual routing via :

    method(){
    ....
    this.navigateTo('/home/advisor');
    ....
    }


    with navigateTo is a custom routing method calling this :

    public navigateTo(url: string) {
    this.oldUrl = this.router.url;
    this.router.navigate(, { skipLocationChange: true }); ...-url-segment-home-adviso"]Continue reading...

Compartilhe esta Página