mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(templates): wip: update templates for 3.0
This commit is contained in:
@@ -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 {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
describe('$CLASSNAMEPage', () => {
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user