Let\'s say I got a component with a fixed input parameter type,
@Component({
selector: \'fixed\',
template: \'{{value}}\'
})
e
I'm just playing with angular and I made this working by using ViewChild, by having Inner and Outer Component.
In inner component declaration of component is like:
@Injectable()
@Component({
selector: 'inner-selector',
templateUrl: ...,
styleUrls: ...,
directives: [
...]
export class InnerComponent**** ...
in outer component which called by router I did:
import {Component} from '@angular/core';
import {InnerComponent} from '../components/inner.component';
import {ViewChild } from '@angular/core';
@Component({
selector: 'demo-app',
template: ' ',
directives: [InnerComponent]
})
export class TestPage {
@ViewChild(InnerComponent)
**private innerComponent:InnerComponent;**
};
I don't know is this a good way, but it worked.
Regards!