基本的なディレクティブの作成は簡単です:
import {Component} from 'angular2/core';
@Component({
selector: 'my-component',
template: '<div>Hello!</div>'
})
export class MyComponent {
constructor() {
}
}
これは期待どおりに機能します。ただし、ディレクティブで Ionic コンポーネントを使用したい場合は、問題が発生します。
import {Component} from 'angular2/core';
@Component({
selector: 'my-component',
template: '<ion-list><ion-item>I am an item</ion-item></ion-list>'
})
export class MyComponent {
constructor() {
}
}
ディレクティブはレンダリングされますが、Ionic コンポーネントは変換されないため、適切に表示/動作しません。
これに関する例は見つかりません。どうすればいいですか?