mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
chore(): begin adding ionic components to mono-repo.
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
<!-- Generated template for the $CLASSNAME component -->
|
||||
<div>
|
||||
{{text}}
|
||||
</div>
|
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicModule } from 'ionic-angular';
|
||||
import { $CLASSNAME } from './$FILENAME';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
$CLASSNAME,
|
||||
],
|
||||
imports: [
|
||||
IonicModule,
|
||||
],
|
||||
exports: [
|
||||
$CLASSNAME
|
||||
]
|
||||
})
|
||||
export class $CLASSNAMEModule {}
|
@ -0,0 +1,3 @@
|
||||
$FILENAME {
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
22
packages/ionic-angular/scripts/templates/component/ts.tmpl
Normal file
22
packages/ionic-angular/scripts/templates/component/ts.tmpl
Normal file
@ -0,0 +1,22 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
/**
|
||||
* Generated class for the $CLASSNAME component.
|
||||
*
|
||||
* See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
|
||||
* for more info on Angular Components.
|
||||
*/
|
||||
@Component({
|
||||
selector: '$FILENAME',
|
||||
templateUrl: '$FILENAME.html'
|
||||
})
|
||||
export class $CLASSNAME {
|
||||
|
||||
text: string;
|
||||
|
||||
constructor() {
|
||||
console.log('Hello $CLASSNAME Component');
|
||||
this.text = 'Hello World';
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
18
packages/ionic-angular/scripts/templates/directive/ts.tmpl
Normal file
18
packages/ionic-angular/scripts/templates/directive/ts.tmpl
Normal file
@ -0,0 +1,18 @@
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
/**
|
||||
* Generated class for the $CLASSNAME directive.
|
||||
*
|
||||
* See https://angular.io/docs/ts/latest/api/core/index/DirectiveMetadata-class.html
|
||||
* for more info on Angular Directives.
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[$FILENAME]' // Attribute selector
|
||||
})
|
||||
export class $CLASSNAME {
|
||||
|
||||
constructor() {
|
||||
console.log('Hello $CLASSNAME Directive');
|
||||
}
|
||||
|
||||
}
|
18
packages/ionic-angular/scripts/templates/page/html.tmpl
Normal file
18
packages/ionic-angular/scripts/templates/page/html.tmpl
Normal file
@ -0,0 +1,18 @@
|
||||
<!--
|
||||
Generated template for the $CLASSNAME page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>$SUPPLIEDNAME</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
</ion-content>
|
16
packages/ionic-angular/scripts/templates/page/module.ts.tmpl
Normal file
16
packages/ionic-angular/scripts/templates/page/module.ts.tmpl
Normal file
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { $CLASSNAME } from './$FILENAME';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
$CLASSNAME,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild($CLASSNAME),
|
||||
],
|
||||
exports: [
|
||||
$CLASSNAME
|
||||
]
|
||||
})
|
||||
export class $CLASSNAMEModule {}
|
3
packages/ionic-angular/scripts/templates/page/scss.tmpl
Normal file
3
packages/ionic-angular/scripts/templates/page/scss.tmpl
Normal file
@ -0,0 +1,3 @@
|
||||
page-$FILENAME {
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
24
packages/ionic-angular/scripts/templates/page/ts.tmpl
Normal file
24
packages/ionic-angular/scripts/templates/page/ts.tmpl
Normal file
@ -0,0 +1,24 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
|
||||
/**
|
||||
* Generated class for the $CLASSNAME page.
|
||||
*
|
||||
* See http://ionicframework.com/docs/components/#navigation for more info
|
||||
* on Ionic pages and navigation.
|
||||
*/
|
||||
@IonicPage()
|
||||
@Component({
|
||||
selector: 'page-$FILENAME',
|
||||
templateUrl: '$FILENAME.html',
|
||||
})
|
||||
export class $CLASSNAME {
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad $CLASSNAME');
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
19
packages/ionic-angular/scripts/templates/pipe/ts.tmpl
Normal file
19
packages/ionic-angular/scripts/templates/pipe/ts.tmpl
Normal file
@ -0,0 +1,19 @@
|
||||
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 Pipes.
|
||||
*/
|
||||
@Pipe({
|
||||
name: '$FILENAME',
|
||||
})
|
||||
export class $CLASSNAME implements PipeTransform {
|
||||
/**
|
||||
* Takes a value and makes it lowercase.
|
||||
*/
|
||||
transform(value: string, ...args) {
|
||||
return value.toLowerCase();
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
18
packages/ionic-angular/scripts/templates/provider/ts.tmpl
Normal file
18
packages/ionic-angular/scripts/templates/provider/ts.tmpl
Normal file
@ -0,0 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Http } from '@angular/http';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
/*
|
||||
Generated class for the $CLASSNAME provider.
|
||||
|
||||
See https://angular.io/docs/ts/latest/guide/dependency-injection.html
|
||||
for more info on providers and Angular DI.
|
||||
*/
|
||||
@Injectable()
|
||||
export class $CLASSNAME {
|
||||
|
||||
constructor(public http: Http) {
|
||||
console.log('Hello $CLASSNAME Provider');
|
||||
}
|
||||
|
||||
}
|
3
packages/ionic-angular/scripts/templates/tabs/html.tmpl
Executable file
3
packages/ionic-angular/scripts/templates/tabs/html.tmpl
Executable file
@ -0,0 +1,3 @@
|
||||
<ion-tabs>
|
||||
$TAB_CONTENT
|
||||
</ion-tabs>
|
13
packages/ionic-angular/scripts/templates/tabs/module.ts.tmpl
Normal file
13
packages/ionic-angular/scripts/templates/tabs/module.ts.tmpl
Normal file
@ -0,0 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { $CLASSNAME } from './$FILENAME';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
$CLASSNAME,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild($CLASSNAME),
|
||||
]
|
||||
})
|
||||
export class $CLASSNAMEModule {}
|
3
packages/ionic-angular/scripts/templates/tabs/scss.tmpl
Executable file
3
packages/ionic-angular/scripts/templates/tabs/scss.tmpl
Executable file
@ -0,0 +1,3 @@
|
||||
page-$FILENAME {
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
21
packages/ionic-angular/scripts/templates/tabs/ts.tmpl
Executable file
21
packages/ionic-angular/scripts/templates/tabs/ts.tmpl
Executable file
@ -0,0 +1,21 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController } from 'ionic-angular';
|
||||
|
||||
/**
|
||||
* Generated class for the $CLASSNAME tabs.
|
||||
*
|
||||
* See https://angular.io/docs/ts/latest/guide/dependency-injection.html for
|
||||
* more info on providers and Angular DI.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'page-$FILENAME',
|
||||
templateUrl: '$FILENAME.html'
|
||||
})
|
||||
@IonicPage()
|
||||
export class $CLASSNAME {
|
||||
|
||||
$TAB_VARIABLES
|
||||
|
||||
constructor(public navCtrl: NavController) {}
|
||||
|
||||
}
|
Reference in New Issue
Block a user