How do I pass specific bindings to ng-outlet components brought in by the component router in Angular 1.5?

Viewed 2750

I'd like to be able to pass parameters to child components brought in with ng-outlet. But I'm not sure how to do it.

Here's an example of my component bindings:

app.component('profile', {
  bindings: {
    section: '=',
    currentUser: '<'
  },
...

Normally I'd invoke this like so:

<profile section="$ctrl.bio" current-user="$ctrl.selectedUser"></profile>

But instead I have this:

<ng-outlet></ng-outlet>

And a router that passes the profile in.

 $routeConfig: [
        { path: '/Profile/:id', name: 'Profile', component: 'profile' }]

So how the blazes do I pass other essential bindings, perhaps bindings that can't be encoded into the URL, to this component??

Thanks, help is very much appreciated

EDIT: I've been asked to provide a more specific example of what I'd like to do.

I thought the conceptual issue was fairly clear, but here's a particular case where passing route parameters is clearly insufficient. Say at my App component level I have an event callback function, onDeleteItem(id)

How do I replicate

bindings: {
    onDeleteItem: "&"
}

...

<some-component on-delete-item="$ctrl.onDeleteItem(id)"></some-component>

with an ng-outlet?

2 Answers
Related