diff --git a/scripts/templates/page/module.ts.tmpl b/scripts/templates/page/module.ts.tmpl index 4f779d4060..d0336e9a28 100644 --- a/scripts/templates/page/module.ts.tmpl +++ b/scripts/templates/page/module.ts.tmpl @@ -1,17 +1,17 @@ import { NgModule } from '@angular/core'; -import { $CLASSNAMEPage } from './$FILENAME'; +import { $CLASSNAME } from './$FILENAME'; import { IonicModule } from 'ionic-angular'; @NgModule({ declarations: [ - $CLASSNAMEPage, + $CLASSNAME, ], imports: [ - IonicModule.forChild($CLASSNAMEPage) + IonicModule.forChild($CLASSNAME) ], entryComponents: [ - $CLASSNAMEPage + $CLASSNAME, ], providers: [] }) -export class $CLASSNAMEPageModule {} +export class $CLASSNAMEModule {} diff --git a/scripts/templates/page/spec.ts.tmpl b/scripts/templates/page/spec.ts.tmpl index 4044cbd706..2a21a514a9 100644 --- a/scripts/templates/page/spec.ts.tmpl +++ b/scripts/templates/page/spec.ts.tmpl @@ -1,5 +1,5 @@ -describe('$CLASSNAMEPage', () => { +describe('$CLASSNAME', () => { it('should do something', () => { expect(true).toEqual(true); }); diff --git a/scripts/templates/page/ts.tmpl b/scripts/templates/page/ts.tmpl index 911a95c7f7..e02d251203 100644 --- a/scripts/templates/page/ts.tmpl +++ b/scripts/templates/page/ts.tmpl @@ -1,22 +1,23 @@ import { Component } from '@angular/core'; -import { NavController, NavParams } from 'ionic-angular'; +import { DeepLink, NavController, NavParams } from 'ionic-angular'; -/* - Generated class for the $CLASSNAME page. - - See http://ionicframework.com/docs/v2/components/#navigation for more info on - Ionic pages and navigation. -*/ +/** + * Generated class for the $CLASSNAME page. + * + * See http://ionicframework.com/docs/v2/components/#navigation for more info + * on Ionic pages and navigation. + */ @Component({ selector: 'page-$FILENAME', - templateUrl: '$FILENAME.html' + templateUrl: '$FILENAME.html', }) -export class $CLASSNAMEPage { +@DeepLink() +export class $CLASSNAME { constructor(public navCtrl: NavController, public navParams: NavParams) {} ionViewDidLoad() { - console.log('ionViewDidLoad $CLASSNAMEPage'); + console.log('ionViewDidLoad $CLASSNAME'); } } diff --git a/scripts/templates/pipe/ts.tmpl b/scripts/templates/pipe/ts.tmpl index 8148d86034..7d1321d33f 100644 --- a/scripts/templates/pipe/ts.tmpl +++ b/scripts/templates/pipe/ts.tmpl @@ -1,21 +1,19 @@ -import { Injectable, Pipe } from '@angular/core'; +import { Pipe, PipeTransform } from '@angular/core'; -/* - Generated class for the $CLASSNAME pipe. - - See https://angular.io/docs/ts/latest/guide/pipes.html for more info on - Angular 2 Pipes. -*/ +/** + * Generated class for the $CLASSNAME pipe. + * + * See https://angular.io/docs/ts/latest/guide/pipes.html for more info on + * Angular Pipes. + */ @Pipe({ - name: '$FILENAME' + name: '$FILENAME', }) -@Injectable() -export class $CLASSNAME { - /* - Takes a value and makes it lowercase. +export class $CLASSNAME implements PipeTransform { + /** + * Takes a value and makes it lowercase. */ - transform(value, args) { - value = value + ''; // make sure it's a string + transform(value: string, ...args) { return value.toLowerCase(); } }