Skip to content

Commit

Permalink
chore(templates): clean up generator templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jgw96 committed Mar 23, 2017
1 parent d04650c commit af6b54c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion scripts/templates/component/module.ts.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { NgModule } from '@angular/core';
import { $CLASSNAME } from './$FILENAME';
import { IonicModule } from 'ionic-angular';
import { $CLASSNAME } from './$FILENAME';

@NgModule({
declarations: [
$CLASSNAME,
],
imports: [
IonicModule.forChild($CLASSNAME),
],
exports: [
$CLASSNAME
]
})
export class $CLASSNAMEModule {}
5 changes: 4 additions & 1 deletion scripts/templates/page/module.ts.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { NgModule } from '@angular/core';
import { $CLASSNAME } from './$FILENAME';
import { IonicModule } from 'ionic-angular';
import { $CLASSNAME } from './$FILENAME';

@NgModule({
declarations: [
$CLASSNAME,
],
imports: [
IonicModule.forChild($CLASSNAME),
],
exports: [
$CLASSNAME
]
})
export class $CLASSNAMEModule {}
2 changes: 1 addition & 1 deletion scripts/templates/page/ts.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
2 changes: 1 addition & 1 deletion scripts/templates/tabs/module.ts.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { $CLASSNAME } from './$FILENAME';
import { IonicModule } from 'ionic-angular';
import { $CLASSNAME } from './$FILENAME';

@NgModule({
declarations: [
Expand Down

0 comments on commit af6b54c

Please sign in to comment.