From af6b54cda6fded7de970a10a6033212f8a1d8cb6 Mon Sep 17 00:00:00 2001 From: jgw96 Date: Thu, 23 Mar 2017 11:09:25 -0500 Subject: [PATCH] chore(templates): clean up generator templates --- scripts/templates/component/module.ts.tmpl | 5 ++++- scripts/templates/page/module.ts.tmpl | 5 ++++- scripts/templates/page/ts.tmpl | 2 +- scripts/templates/tabs/module.ts.tmpl | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/templates/component/module.ts.tmpl b/scripts/templates/component/module.ts.tmpl index 592f0590b7..56688ec9cb 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 592f0590b7..56688ec9cb 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 424e745535..e640e5d1bd 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 592f0590b7..c7a8a73111 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: [