Creating a basic directive is simple:
import {Component} from \'angular2/core\';
@Component({
selector: \'my-component\',
template: \'Hello!&
Found the answer here:
You have to import the Ionic components and register them as 'directives'
So my second example becomes:
import {Component} from 'angular2/core';
import {List, Item} from 'ionic/ionic';
@Component({
selector: 'my-component',
directives: [List, Item],
template: '<ion-list><ion-item>I am an item</ion-item></ion-list>'
})
export class MyComponent {
constructor() {
}
}