Marco
Marco

Reputation: 593

How to routing from a page inside <router-outlet> to another inside <router-outlet> in AngularDart

In my app_component.html file I have a navbar and, below of it:

<router-outlet [routes]="Routes.all"></router-outlet>

In my Routes.all I have 2 pages: page1 and page2. In my page1 page I have a button. When the user clicks on it, the page2 would be shown. How can I do this?

I tried –without results– this in way (in my page1.html file):

<material-fab raised>
    <a [routerLink]="RoutePaths.page2.toUrl()" [routerLinkActive]="'active'">
        <img src="img/icons/outline-photo_camera-24px.svg" type="image/svg+xml">
</a>
</material-fab>

Upvotes: 1

Views: 48

Answers (0)

Related Questions