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 Jun 26, 2021. It is now read-only.
there is a url.indexOf() call. If your templateUrl for this route is a function you will get a console error that url.indexOf is not a function because url is a function that will return a string if involked with the params of the upcoming route.
we use a function for one of our routes to manipulate one of the params so the page title can be dynamically updated using the param value.
everytime we hit this route we get this error.
I'm attempting to patch this by checking if the url is a function and then involking it first to get the string value back before calling the .indexOf() but i'm having trouble getting access to the params of the upcoming route to involk the templateUrl function.
i've tried $routeParams and $route.current.params as per angular docs to try to acces the params for the route but i'm either getting nothing or the current route
the other option is to change the routeChangeHandler and stateChangeHandler functions and check the params there before calling the isAnonymousEndpoint function all together.
as far as i can see those are the only 2 places isAnonymousEndpoint is called in adal-angular so it could be easy to modify
i've also tried adding the path to the template to my anonymous endpoints array in my init but it doesn't stop the error because it's still going to end up passing the function reference to isAnonymousEndpoint in the handler code regardless.
The text was updated successfully, but these errors were encountered:
i've got a patch that can fix it for the routeChangeHandler that i can put up in the next 2 hours but we don't use ui-router so i can't trigger the stateChangeHandler to test if the toParams will give me what i need to handle this problem on a state change
i can put up the patch to fix the routeChangeHandler though and someone else who uses ui-router can patch stateChangeHandler separately
per the angular documentation the templateUrl can be either a string or a function. if it is a function it is passed the params of the route
see: https://docs.angularjs.org/api/ngRoute/provider/$routeProvider
in the adal-angular code
there is a url.indexOf() call. If your templateUrl for this route is a function you will get a console error that url.indexOf is not a function because url is a function that will return a string if involked with the params of the upcoming route.
we use a function for one of our routes to manipulate one of the params so the page title can be dynamically updated using the param value.
everytime we hit this route we get this error.
I'm attempting to patch this by checking if the url is a function and then involking it first to get the string value back before calling the .indexOf() but i'm having trouble getting access to the params of the upcoming route to involk the templateUrl function.
i've tried $routeParams and $route.current.params as per angular docs to try to acces the params for the route but i'm either getting nothing or the current route
the other option is to change the
routeChangeHandler
andstateChangeHandler
functions and check the params there before calling theisAnonymousEndpoint
function all together.as far as i can see those are the only 2 places
isAnonymousEndpoint
is called in adal-angular so it could be easy to modifyi've also tried adding the path to the template to my anonymous endpoints array in my init but it doesn't stop the error because it's still going to end up passing the function reference to
isAnonymousEndpoint
in the handler code regardless.The text was updated successfully, but these errors were encountered: