Which @angular/* package(s) are relevant/related to the feature request?
core
Description
I want a simple way to pass data into "router-outlet" child components
Proposed solution
@Component({
selector : 'main',
template : `<router-outlet [data]="data"></router-outlet>`
})
export class MainComponent {
data = 'test';
}
Retrive the data into the routed component
import {ROUTER_DATA, Component, Inject } from '@angular/core';
@Component({
selector: 'child',
template: `{{data}}`
})
export class ChildComponent {
constructor(@Inject(ROUTER_DATA) public data: any) { }
}
Alternatives considered
Nothing
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
I want a simple way to pass data into "router-outlet" child components
Proposed solution
Retrive the data into the routed component
Alternatives considered
Nothing