diff --git a/scripts/templates/component/html.tmpl b/scripts/templates/component/html.tmpl index 9a1386e1f1..16b0f3c410 100644 --- a/scripts/templates/component/html.tmpl +++ b/scripts/templates/component/html.tmpl @@ -4,6 +4,5 @@ See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html for more info on Angular 2 Components. --> -
- {{text}} -
\ No newline at end of file + +{{text}} diff --git a/scripts/templates/component/scss.tmpl b/scripts/templates/component/scss.tmpl index 686be810e2..6d2b63f56b 100644 --- a/scripts/templates/component/scss.tmpl +++ b/scripts/templates/component/scss.tmpl @@ -1,3 +1,3 @@ -.$FILENAME { +$FILENAME { } diff --git a/scripts/templates/component/ts.tmpl b/scripts/templates/component/ts.tmpl index 5c96c61b69..20231d5f25 100644 --- a/scripts/templates/component/ts.tmpl +++ b/scripts/templates/component/ts.tmpl @@ -15,6 +15,8 @@ export class $CLASSNAME { text: string; constructor() { + console.log('Hello $CLASSNAME Component'); this.text = 'Hello World'; } + } diff --git a/scripts/templates/directive/ts.tmpl b/scripts/templates/directive/ts.tmpl index b5aa4f1fe1..00b23efced 100644 --- a/scripts/templates/directive/ts.tmpl +++ b/scripts/templates/directive/ts.tmpl @@ -10,7 +10,9 @@ import { Directive } from '@angular/core'; selector: '[$FILENAME]' // Attribute selector }) export class $CLASSNAME { + constructor() { - console.log('Hello World'); + console.log('Hello $CLASSNAME Directive'); } + } diff --git a/scripts/templates/page/scss.tmpl b/scripts/templates/page/scss.tmpl index 686be810e2..db0351fd1c 100644 --- a/scripts/templates/page/scss.tmpl +++ b/scripts/templates/page/scss.tmpl @@ -1,3 +1,3 @@ -.$FILENAME { +page-$FILENAME { } diff --git a/scripts/templates/page/ts.tmpl b/scripts/templates/page/ts.tmpl index 17bb6ab242..022748c431 100644 --- a/scripts/templates/page/ts.tmpl +++ b/scripts/templates/page/ts.tmpl @@ -8,12 +8,15 @@ import { NavController } from 'ionic-angular'; Ionic pages and navigation. */ @Component({ + selector: 'page-$FILENAME', templateUrl: '$FILENAME.html' }) export class $CLASSNAME { - constructor(private navCtrl: NavController) { + constructor(public navCtrl: NavController) {} + ionViewDidLoad() { + console.log('Hello $CLASSNAME Page'); } } diff --git a/scripts/templates/provider/ts.tmpl b/scripts/templates/provider/ts.tmpl index b23781006f..47fce52e8f 100644 --- a/scripts/templates/provider/ts.tmpl +++ b/scripts/templates/provider/ts.tmpl @@ -11,7 +11,8 @@ import 'rxjs/add/operator/map'; @Injectable() export class $CLASSNAME { - constructor(private http: Http) { + constructor(public http: Http) { + console.log('Hello $CLASSNAME Provider'); } } diff --git a/scripts/templates/tabs/scss.tmpl b/scripts/templates/tabs/scss.tmpl index 686be810e2..db0351fd1c 100755 --- a/scripts/templates/tabs/scss.tmpl +++ b/scripts/templates/tabs/scss.tmpl @@ -1,3 +1,3 @@ -.$FILENAME { +page-$FILENAME { } diff --git a/scripts/templates/tabs/ts.tmpl b/scripts/templates/tabs/ts.tmpl index 7bb7b2cc3b..c2e1926a68 100755 --- a/scripts/templates/tabs/ts.tmpl +++ b/scripts/templates/tabs/ts.tmpl @@ -3,17 +3,21 @@ import { NavController } from 'ionic-angular'; $TAB_IMPORTS /* - Generated class for the $CLASSNAME provider. + Generated class for the $CLASSNAME tabs. See https://angular.io/docs/ts/latest/guide/dependency-injection.html for more info on providers and Angular 2 DI. */ @Component({ + selector: 'page-$FILENAME', templateUrl: '$FILENAME.html' }) export class $CLASSNAME { $TAB_VARIABLES - constructor(public navCtrl: NavController) {} + constructor(public navCtrl: NavController) { + + } + } \ No newline at end of file