mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(decorators): changes to match angular style guide
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> component.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> component.
|
||||
@ -11,6 +11,9 @@ import {Component} from '@angular/core';
|
||||
templateUrl: 'build/<%= directory %>/<%= fileName %>/<%= fileName %>.html'
|
||||
})
|
||||
export class <%= jsClassName %> {
|
||||
|
||||
text: string;
|
||||
|
||||
constructor() {
|
||||
this.text = 'Hello World';
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive} from '@angular/core';
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> directive.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive} from '@angular/core';
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> directive.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {NavController} from 'ionic-angular';
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> page.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {NavController} from 'ionic-angular';
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> page.
|
||||
@ -11,5 +11,5 @@ import {NavController} from 'ionic-angular';
|
||||
templateUrl: 'build/<%= directory %>/<%= fileName %>/<%= fileName %>.html',
|
||||
})
|
||||
export class <%= jsClassName %> {
|
||||
constructor(public nav: NavController) {}
|
||||
constructor(private nav: NavController) {}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable, Pipe} from '@angular/core';
|
||||
import { Injectable, Pipe } from '@angular/core';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> pipe.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable, Pipe} from '@angular/core';
|
||||
import { Injectable, Pipe } from '@angular/core';
|
||||
|
||||
/*
|
||||
Generated class for the <%= jsClassName %> pipe.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Http} from '@angular/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Http } from '@angular/http';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Http} from '@angular/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Http } from '@angular/http';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
/*
|
||||
@ -10,9 +10,11 @@ import 'rxjs/add/operator/map';
|
||||
*/
|
||||
@Injectable()
|
||||
export class <%= jsClassName %> {
|
||||
data: any = null;
|
||||
data: any;
|
||||
|
||||
constructor(public http: Http) {}
|
||||
constructor(private http: Http) {
|
||||
this.data = null;
|
||||
}
|
||||
|
||||
load() {
|
||||
if (this.data) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {NavController} from 'ionic-angular';
|
||||
<% _.forEach(tabs, function(tab) { %>import {<%= tab.jsClassName %>} from '../<%= tab.fileName %>/<%= tab.fileName %>';
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
<% _.forEach(tabs, function(tab) { %>import { <%= tab.jsClassName %> } from '../<%= tab.fileName %>/<%= tab.fileName %>';
|
||||
<% }); %>
|
||||
|
||||
@Component({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {NavController} from 'ionic-angular';
|
||||
<% _.forEach(tabs, function(tab) { %>import {<%= tab.jsClassName %>} from '../<%= tab.fileName %>/<%= tab.fileName %>';
|
||||
import { Component } from '@angular/core';
|
||||
import { NavController } from 'ionic-angular';
|
||||
<% _.forEach(tabs, function(tab) { %>import { <%= tab.jsClassName %> } from '../<%= tab.fileName %>/<%= tab.fileName %>';
|
||||
<% }); %>
|
||||
|
||||
@Component({
|
||||
@ -8,7 +8,7 @@ import {NavController} from 'ionic-angular';
|
||||
})
|
||||
export class <%= jsClassName %> {
|
||||
|
||||
constructor(public nav: NavController) {
|
||||
constructor(private nav: NavController) {
|
||||
// set the root pages for each tab
|
||||
<% _.forEach(tabs, function(tab, i) { %>this.tab<%= ++i %>Root = <%= tab.jsClassName %>;
|
||||
<% }); %>
|
||||
|
Reference in New Issue
Block a user