diff --git a/scripts/templates/component/module.ts.tmpl b/scripts/templates/component/module.ts.tmpl index 592f0590b7e..56688ec9cb6 100644 --- a/scripts/templates/component/module.ts.tmpl +++ b/scripts/templates/component/module.ts.tmpl @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; -import { $CLASSNAME } from './$FILENAME'; import { IonicModule } from 'ionic-angular'; +import { $CLASSNAME } from './$FILENAME'; @NgModule({ declarations: [ @@ -8,6 +8,9 @@ import { IonicModule } from 'ionic-angular'; ], imports: [ IonicModule.forChild($CLASSNAME), + ], + exports: [ + $CLASSNAME ] }) export class $CLASSNAMEModule {} diff --git a/scripts/templates/page/module.ts.tmpl b/scripts/templates/page/module.ts.tmpl index 592f0590b7e..56688ec9cb6 100644 --- a/scripts/templates/page/module.ts.tmpl +++ b/scripts/templates/page/module.ts.tmpl @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; -import { $CLASSNAME } from './$FILENAME'; import { IonicModule } from 'ionic-angular'; +import { $CLASSNAME } from './$FILENAME'; @NgModule({ declarations: [ @@ -8,6 +8,9 @@ import { IonicModule } from 'ionic-angular'; ], imports: [ IonicModule.forChild($CLASSNAME), + ], + exports: [ + $CLASSNAME ] }) export class $CLASSNAMEModule {} diff --git a/scripts/templates/page/ts.tmpl b/scripts/templates/page/ts.tmpl index 424e7455351..e640e5d1bd2 100644 --- a/scripts/templates/page/ts.tmpl +++ b/scripts/templates/page/ts.tmpl @@ -7,11 +7,11 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular'; * See http://ionicframework.com/docs/v2/components/#navigation for more info * on Ionic pages and navigation. */ + @IonicPage() @Component({ selector: 'page-$FILENAME', templateUrl: '$FILENAME.html', }) -@IonicPage() export class $CLASSNAME { constructor(public navCtrl: NavController, public navParams: NavParams) {} diff --git a/scripts/templates/tabs/module.ts.tmpl b/scripts/templates/tabs/module.ts.tmpl index 592f0590b7e..c7a8a731112 100644 --- a/scripts/templates/tabs/module.ts.tmpl +++ b/scripts/templates/tabs/module.ts.tmpl @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; -import { $CLASSNAME } from './$FILENAME'; import { IonicModule } from 'ionic-angular'; +import { $CLASSNAME } from './$FILENAME'; @NgModule({ declarations: [