Я пытаюсь построить простой компонент, только DIV, который печатает параметр, но не отображается параметр:параметров в Ionic2 пользовательского компонента не отображается
test.html
<ion-content padding class="getting-started">
<my-component [test]="Something"></my-component>
</ion-content>
тест .ts
import {Page} from 'ionic-framework/ionic';
import {MyComponent} from './myComponent';
@Page({
templateUrl: 'build/pages/test/test.html',
directives: [MyComponent]
})
export class TestPage {
constructor() {
}
}
myComponent.ts
import {Component,Input} from 'angular2/core';
@Component({
selector: 'my-component',
template: `
<div>Param: {{test}}</div>
`,
})
export class MyComponent {
@Input() test;
constructor() {
}
}
Результат:
Я не могу понять, что мне не хватает.
.. http://meta.stackoverflow.com/questions/288160/no-thanks-damn-it –