Common Ionic Directives

This commit is contained in:
Max Lynch
2015-05-07 10:16:02 -05:00
parent 7353a616ec
commit 69ad5777bd
3 changed files with 12 additions and 2 deletions

View File

@ -1,11 +1,14 @@
import {Component, View, bootstrap} from 'angular2/angular2' import {Component, View, bootstrap} from 'angular2/angular2'
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms'; import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
import {Button, Switch, Form, List, Label, Item, Input, Content} from 'ionic/ionic'; //import {Button, Switch, Form, List, Label, Item, Input, Content} from 'ionic/ionic';
import {IONIC_DIRECTIVES} from 'ionic/ionic'
console.log([FormDirectives].concat(IONIC_DIRECTIVES));
@Component({ selector: '[ion-app]' }) @Component({ selector: '[ion-app]' })
@View({ @View({
templateUrl: 'main.html', templateUrl: 'main.html',
directives: [FormDirectives, List, Label, Item, Button, Input, Content] directives: [FormDirectives].concat(IONIC_DIRECTIVES)
}) })
class IonicApp { class IonicApp {
constructor() { constructor() {

6
ionic/directives.js Normal file
View File

@ -0,0 +1,6 @@
import {Button, Switch, List, Label, Item, Input, Content} from 'ionic/ionic';
var IONIC_DIRECTIVES = [Button, List, Label, Item, Content];
console.log('DIRECTIVES', IONIC_DIRECTIVES);
export {IONIC_DIRECTIVES};

View File

@ -30,6 +30,7 @@ Object.defineProperties(ViewContainerRef.prototype, {
export * from 'ionic/components' export * from 'ionic/components'
export * from 'ionic/directives'
export * from 'ionic/platform/platform' export * from 'ionic/platform/platform'
export * from 'ionic/routing/router' export * from 'ionic/routing/router'