Lets say we have a component in Aurelia named UserRouter, which is a child router and handles routing to UserProfile, UserImages and UserFriends.
I want the UserRouter to load in the user from the API (on canActivate) and then pass this this user data to sub components.
Loading in the data is fine, how do I pass it down to sub components so they can all read it? e.g. placing an attribute on <router-view>
.
I've tried the bindingContext argument on the bind() method of sub components but this hasn't worked.
Thanks