Я хотел бы ссылаться на свойство на компоненте в A., что "конструктор компонента B. этот компонентный шаблон. Apis на этом, кажется, немного меняется, но я ожидаю, что следующее будет работать:
<my-component [greeting]="hello"></my-component>
// my component.es6.js
@Component({
selector: 'my-component',
properties: {
'greeting': 'greeting'
}
})
@View({
template: '{{greeting}} world!'
})
class App {
constructor() {
console.log(this.properties) // just a guess
}
}
Что я делаю неправильно?