angular - Load different page if params are present -
hi wondering if possible open different page based on if params present or not.
i tried following 2 possibilities:
{ path: 'page1', component: page1, canactivate: [authguard], children: [ { path: 'page1/:test', component: page2, canactivate: [authguard] } ] }, and having them seperate
{ path: 'page1', component: page1, canactivate: [authguard] }, { path: 'page1/:test', component: page2, canactivate: [authguard] } how can achieve effect? because both these options browser opens page1 if param test added. or should use different naming convention? (would rather not)
aaah figured out making plunker (thanks @maximus).
i navigating to: :8080/page1?test=something instead of :8080/page1/something
the configuration indeed correct. sorry inconvenience.
Comments
Post a Comment