mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Feature(generators): Add generators for components, directives, and injectables
This commit is contained in:
15
tooling/generators/component/component.tmpl.js
Normal file
15
tooling/generators/component/component.tmpl.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {Component, NgIf} from 'angular2/angular2';
|
||||
|
||||
@Component({
|
||||
directives: [NgIf],
|
||||
properties: ['value'], //Change to be whatever properties you want, ex: <<%= fileAndClassName %> value="5">
|
||||
selector: '<%= fileAndClassName %>',
|
||||
templateUrl: 'app/<%= fileAndClassName %>/<%= fileAndClassName %>.html'
|
||||
})
|
||||
export class <%= javascriptClassName %> {
|
||||
constructor() {
|
||||
this.nav = nav;
|
||||
this.popup = popup;
|
||||
this.dataService = dataService;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user