chore(templates): update generator templates

This commit is contained in:
Adam Bradley
2016-09-26 10:57:21 +01:00
parent dc1a59df49
commit 7cf01fbc21
9 changed files with 22 additions and 11 deletions

View File

@ -4,6 +4,5 @@
See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
for more info on Angular 2 Components.
-->
<div>
{{text}}
</div>
{{text}}

View File

@ -1,3 +1,3 @@
.$FILENAME {
$FILENAME {
}

View File

@ -15,6 +15,8 @@ export class $CLASSNAME {
text: string;
constructor() {
console.log('Hello $CLASSNAME Component');
this.text = 'Hello World';
}
}

View File

@ -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');
}
}

View File

@ -1,3 +1,3 @@
.$FILENAME {
page-$FILENAME {
}

View File

@ -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');
}
}

View File

@ -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');
}
}

View File

@ -1,3 +1,3 @@
.$FILENAME {
page-$FILENAME {
}

View File

@ -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) {
}
}