We use angularJS, do we have to use the SPA API for every call to notify Iridize what page has been loaded?

Yes, you do. You can read the full story in our documentation for setting up Iridize with a Single Page Application (SPA).

The good news is that when using AngularJS's $route or the oft-used ui-router this can be readily done using route or state change events.

The way Iridize should be notified when a route/state is changed is by calling the api.route.update Iridize JS API call.

When using the AngularJS's $route for view routing you can bind on the $routeChangeSuccess event. When using ui-router you can bind on the analogous $stateChangeSuccess event. Both events provide the new route/state which can be passed to the api.route.update call.

Have more questions? Submit a request


Please sign in to leave a comment.