You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
The useAsDefault property on the HeroList Route Definition, indicates
that if no other Route Definition matches the URL, then this Route Definition should be
used by default.
but when I mark a route as useAsDefault and go to an invalid url hash-address, then nothing happens.
Steps to reproduce:
Download the component router demo app from plunker
Extract the zip file and start your favourite web server for the downloaded folder (e.g. php -S localhost:8080)
Edit app.js and change $locationProvider.html5Mode(false); to $locationProvider.html5Mode(true);. This is not strictly required, but this is what I did.
Go to localhost:8080. Result: You are correctly redirected to http://localhost:8080/#/crisis-center
Go to http://localhost:8080/#/heroes. Result: the Heroes component is correctly loaded.
Manually change the url to say: http://localhost:8080/#/foo-bar
Result:
Nothing happens. The url now says http://localhost:8080/#/foo-bar, but the application still shows the Heroes page.
Expected result:
Application redirects to the useAsDefault route, which is http://localhost:8080/#/crisis-center
Angular docs link say:
but when I mark a route as
useAsDefault
and go to an invalid url hash-address, then nothing happens.Steps to reproduce:
component router
demo app from plunkerphp -S localhost:8080
)app.js
and change$locationProvider.html5Mode(false);
to$locationProvider.html5Mode(true);
. This is not strictly required, but this is what I did.http://localhost:8080/#/crisis-center
http://localhost:8080/#/heroes
. Result: the Heroes component is correctly loaded.http://localhost:8080/#/foo-bar
Result:
Nothing happens. The url now says
http://localhost:8080/#/foo-bar
, but the application still shows theHeroes
page.Expected result:
Application redirects to the
useAsDefault
route, which ishttp://localhost:8080/#/crisis-center
More info:
When I change this:
into this:
in
angular_1_router.js
, then it works. If I was to fix that properly though, I would putstraight after
. But I don't actually know, where the ts file for that source is.
The text was updated successfully, but these errors were encountered: