mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(angular): update to angular 2.0.0-rc.1
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
<ion-item *ngIf="loggedIn">
|
||||
Welcome, Administrator!
|
||||
</ion-item>
|
||||
<button ion-item menuClose *ngFor="#p of pages" (click)="openPage(menu, p)" [hidden]="(loggedIn == true && p.showLoggedIn == false) || (loggedIn == false && p.showLoggedIn == true)">
|
||||
<button ion-item menuClose *ngFor="let p of pages" (click)="openPage(menu, p)" [hidden]="(loggedIn == true && p.showLoggedIn == false) || (loggedIn == false && p.showLoggedIn == true)">
|
||||
<ion-label primary>{{p.title}}</ion-label>
|
||||
</button>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {App, InfiniteScroll} from 'ionic-angular';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
/**
|
||||
* Mock Data Access Object
|
||||
|
@ -5,7 +5,7 @@
|
||||
<ion-content>
|
||||
|
||||
<ion-list>
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-item *ngFor="let item of items">
|
||||
{{ item }}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {App, Page, IonicApp, Config, Platform} from 'ionic-angular';
|
||||
import {Storage, LocalStorage} from 'ionic-angular';
|
||||
import {Pipe, PipeTransform, Injectable} from 'angular2/core'
|
||||
import {Pipe, PipeTransform, Injectable} from '@angular/core'
|
||||
|
||||
|
||||
@Pipe({name: 'cleanLocalData'})
|
||||
|
@ -11,7 +11,7 @@
|
||||
<ion-item>
|
||||
<ion-label>Key</ion-label>
|
||||
<ion-select [(ngModel)]="myItem.key">
|
||||
<ion-option *ngFor="#key of keys" [value]="key">
|
||||
<ion-option *ngFor="let key of keys" [value]="key">
|
||||
{{ key }}
|
||||
</ion-option>
|
||||
</ion-select>
|
||||
@ -20,7 +20,7 @@
|
||||
<ion-item>
|
||||
<ion-label>Value</ion-label>
|
||||
<ion-select [(ngModel)]="myItem.value">
|
||||
<ion-option *ngFor="#value of values" [value]="value">
|
||||
<ion-option *ngFor="let value of values" [value]="value">
|
||||
{{ value }}
|
||||
</ion-option>
|
||||
</ion-select>
|
||||
@ -42,7 +42,7 @@
|
||||
<ion-label>Key</ion-label>
|
||||
<ion-select [(ngModel)]="delKey">
|
||||
<ion-option checked>Select a Key</ion-option>
|
||||
<ion-option *ngFor="#key of addedKeys" [value]="key">
|
||||
<ion-option *ngFor="let key of addedKeys" [value]="key">
|
||||
{{ key }}
|
||||
</ion-option>
|
||||
</ion-select>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {App, Page, Refresher} from 'ionic-angular';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
/**
|
||||
* Mock Data Access Object
|
||||
|
@ -12,7 +12,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<ion-list>
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-item *ngFor="let item of items">
|
||||
{{ item }}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
@ -82,7 +82,7 @@
|
||||
<ion-item>
|
||||
<ion-label>Pets</ion-label>
|
||||
<ion-select [(ngModel)]="pets" multiple="true" [alertOptions]="petAlertOpts">
|
||||
<ion-option *ngFor="#o of petData" [value]="o.value">{{o.text}}</ion-option>
|
||||
<ion-option *ngFor="let o of petData" [value]="o.value">{{o.text}}</ion-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<ion-slides loop="true" style="background-color: black">
|
||||
<ion-slide *ngFor="#image of [1,2,3,4,5]">
|
||||
<ion-slide *ngFor="let image of [1,2,3,4,5]">
|
||||
<img data-src="./slide{{image}}.jpeg">
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
@ -355,11 +355,9 @@ gulp.task('copy.libs', function() {
|
||||
'node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.src.js', //npm2
|
||||
'node_modules/es6-module-loader/dist/es6-module-loader.src.js', //npm3
|
||||
'node_modules/systemjs/dist/system.src.js',
|
||||
'node_modules/angular2/bundles/angular2-polyfills.js',
|
||||
'node_modules/angular2/bundles/angular2.dev.js',
|
||||
'node_modules/angular2/bundles/router.dev.js',
|
||||
'node_modules/angular2/bundles/http.dev.js',
|
||||
'node_modules/rxjs/bundles/Rx.js'
|
||||
'node_modules/rxjs/bundles/Rx.js',
|
||||
'node_modules/zone.js/dist/zone.js',
|
||||
'node_modules/reflect-metadata/Reflect.js'
|
||||
])
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Animation} from '../../animations/animation';
|
||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||
@ -221,7 +221,7 @@ export class ActionSheet extends ViewController {
|
||||
'<div class="action-sheet-group">' +
|
||||
'<div class="action-sheet-title" id="{{hdrId}}" *ngIf="d.title">{{d.title}}</div>' +
|
||||
'<div class="action-sheet-sub-title" id="{{descId}}" *ngIf="d.subTitle">{{d.subTitle}}</div>' +
|
||||
'<button category="action-sheet-button" (click)="click(b)" *ngFor="#b of d.buttons" class="disable-hover" [ngClass]="b.cssClass">' +
|
||||
'<button category="action-sheet-button" (click)="click(b)" *ngFor="let b of d.buttons" class="disable-hover" [ngClass]="b.cssClass">' +
|
||||
'<ion-icon [name]="b.icon" *ngIf="b.icon" class="action-sheet-icon"></ion-icon> ' +
|
||||
'{{b.text}}' +
|
||||
'</button>' +
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Animation} from '../../animations/animation';
|
||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||
@ -322,7 +322,7 @@ export class Alert extends ViewController {
|
||||
|
||||
'<template ngSwitchWhen="radio">' +
|
||||
'<div class="alert-radio-group" role="radiogroup" [attr.aria-labelledby]="hdrId" [attr.aria-activedescendant]="activeId">' +
|
||||
'<button category="alert-radio-button" *ngFor="#i of d.inputs" (click)="rbClick(i)" [attr.aria-checked]="i.checked" [attr.id]="i.id" class="alert-tappable alert-radio" role="radio">' +
|
||||
'<button category="alert-radio-button" *ngFor="let i of d.inputs" (click)="rbClick(i)" [attr.aria-checked]="i.checked" [attr.id]="i.id" class="alert-tappable alert-radio" role="radio">' +
|
||||
'<div class="alert-radio-icon"><div class="alert-radio-inner"></div></div>' +
|
||||
'<div class="alert-radio-label">' +
|
||||
'{{i.label}}' +
|
||||
@ -333,7 +333,7 @@ export class Alert extends ViewController {
|
||||
|
||||
'<template ngSwitchWhen="checkbox">' +
|
||||
'<div class="alert-checkbox-group">' +
|
||||
'<button category="alert-checkbox-button" *ngFor="#i of d.inputs" (click)="cbClick(i)" [attr.aria-checked]="i.checked" class="alert-tappable alert-checkbox" role="checkbox">' +
|
||||
'<button category="alert-checkbox-button" *ngFor="let i of d.inputs" (click)="cbClick(i)" [attr.aria-checked]="i.checked" class="alert-tappable alert-checkbox" role="checkbox">' +
|
||||
'<div class="alert-checkbox-icon"><div class="alert-checkbox-inner"></div></div>' +
|
||||
'<div class="alert-checkbox-label">' +
|
||||
'{{i.label}}' +
|
||||
@ -344,7 +344,7 @@ export class Alert extends ViewController {
|
||||
|
||||
'<template ngSwitchDefault>' +
|
||||
'<div class="alert-input-group">' +
|
||||
'<div *ngFor="#i of d.inputs" class="alert-input-wrapper">' +
|
||||
'<div *ngFor="let i of d.inputs" class="alert-input-wrapper">' +
|
||||
'<input [placeholder]="i.placeholder" [(ngModel)]="i.value" [type]="i.type" class="alert-input">' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
@ -352,7 +352,7 @@ export class Alert extends ViewController {
|
||||
|
||||
'</div>' +
|
||||
'<div class="alert-button-group" [ngClass]="{vertical: d.buttons.length>2}">' +
|
||||
'<button category="alert-button" *ngFor="#b of d.buttons" (click)="btnClick(b)" [ngClass]="b.cssClass">' +
|
||||
'<button category="alert-button" *ngFor="let b of d.buttons" (click)="btnClick(b)" [ngClass]="b.cssClass">' +
|
||||
'{{b.text}}' +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Alert, Loading, NavController, App, Page } from '../../../../../ionic/index';
|
||||
import { FORM_DIRECTIVES, FormBuilder, ControlGroup, Validators } from 'angular2/common';
|
||||
import { FORM_DIRECTIVES, FormBuilder, ControlGroup, Validators } from '@angular/common';
|
||||
|
||||
|
||||
@Page({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Injectable, Injector} from 'angular2/core';
|
||||
import {Title} from 'angular2/platform/browser';
|
||||
import {Injectable, Injector} from '@angular/core';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {ClickBlock} from '../../util/click-block';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from 'angular2/core';
|
||||
import {Control, ControlGroup} from 'angular2/common';
|
||||
import {Component} from '@angular/core';
|
||||
import {Control, ControlGroup} from '@angular/common';
|
||||
|
||||
import {App, Storage, LocalStorage, SqlStorage} from '../../../../../ionic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Renderer, Attribute} from 'angular2/core';
|
||||
import {Directive, ElementRef, Renderer, Attribute} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, Renderer, Attribute, Optional, Input, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ElementRef, Renderer, Attribute, Optional, Input, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {Toolbar} from '../toolbar/toolbar';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, Optional, Input, Output, EventEmitter, HostListener, Provider, forwardRef, ViewEncapsulation} from 'angular2/core';
|
||||
import {NG_VALUE_ACCESSOR} from 'angular2/common';
|
||||
import {Component, Optional, Input, Output, EventEmitter, HostListener, Provider, forwardRef, ViewEncapsulation} from '@angular/core';
|
||||
import {NG_VALUE_ACCESSOR} from '@angular/common';
|
||||
|
||||
import {Form} from '../../util/form';
|
||||
import {Item} from '../item/item';
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
NgControlName,
|
||||
NgFormModel,
|
||||
FormBuilder
|
||||
} from 'angular2/common';
|
||||
} from '@angular/common';
|
||||
|
||||
|
||||
@App({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, Optional, NgZone, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ElementRef, Optional, NgZone, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {IonicApp} from '../app/app';
|
||||
@ -28,7 +28,7 @@ import {ScrollView} from '../../util/scroll-view';
|
||||
* you can use Angular's `@ViewChild` annotation:
|
||||
*
|
||||
* ```ts
|
||||
* import {ViewChild} from 'angular2/core';
|
||||
* import {ViewChild} from '@angular/core';
|
||||
* import {Content} from 'ionic-angular';
|
||||
*
|
||||
* @Page({...}
|
||||
@ -217,7 +217,7 @@ export class Content extends Ion {
|
||||
* Scroll to the specified position.
|
||||
*
|
||||
* ```ts
|
||||
* import {ViewChild} from 'angular2/core';
|
||||
* import {ViewChild} from '@angular/core';
|
||||
* import {Content} from 'ionic-angular';
|
||||
*
|
||||
* @Page({
|
||||
@ -248,7 +248,7 @@ export class Content extends Ion {
|
||||
* Scroll to the top of the content component.
|
||||
*
|
||||
* ```ts
|
||||
* import {ViewChild} from 'angular2/core';
|
||||
* import {ViewChild} from '@angular/core';
|
||||
* import {Content} from 'ionic-angular';
|
||||
*
|
||||
* @Page({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, Optional, ElementRef, Renderer, Input, Output, Provider, forwardRef, EventEmitter, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||
import {NG_VALUE_ACCESSOR} from 'angular2/common';
|
||||
import {Component, Optional, ElementRef, Renderer, Input, Output, Provider, forwardRef, EventEmitter, HostListener, ViewEncapsulation} from '@angular/core';
|
||||
import {NG_VALUE_ACCESSOR} from '@angular/common';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {Picker, PickerColumn, PickerColumnOption} from '../picker/picker';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Renderer, Input} from 'angular2/core';
|
||||
import {Directive, ElementRef, Renderer, Input} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Input, ElementRef, ChangeDetectionStrategy, ViewEncapsulation, NgZone} from 'angular2/core';
|
||||
import {Component, Input, ElementRef, ChangeDetectionStrategy, ViewEncapsulation, NgZone} from '@angular/core';
|
||||
|
||||
import {nativeRaf} from '../../util/dom';
|
||||
import {isPresent} from '../../util/util';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Input, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, Input, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {InfiniteScroll} from './infinite-scroll';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, Input, Output, EventEmitter, Host, NgZone, ElementRef} from 'angular2/core';
|
||||
import {Directive, Input, Output, EventEmitter, Host, NgZone, ElementRef} from '@angular/core';
|
||||
|
||||
import {Content} from '../content/content';
|
||||
|
||||
@ -19,7 +19,7 @@ import {Content} from '../content/content';
|
||||
* <ion-content>
|
||||
*
|
||||
* <ion-list>
|
||||
* <ion-item *ngFor="#i of items">{{i}}</ion-item>
|
||||
* <ion-item *ngFor="let i of items">{{i}}</ion-item>
|
||||
* </ion-list>
|
||||
*
|
||||
* <ion-infinite-scroll (infinite)="doInfinite($event)">
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ViewChild} from 'angular2/core';
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {App, Page, InfiniteScroll, NavController} from '../../../../../ionic';
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
</button>
|
||||
|
||||
<ion-list>
|
||||
<button ion-item (click)="goToPage2()" *ngFor="#item of items">
|
||||
<button ion-item (click)="goToPage2()" *ngFor="let item of items">
|
||||
{{ item }}
|
||||
</button>
|
||||
</ion-list>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ion-content>
|
||||
|
||||
<ion-list>
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-item *ngFor="let item of items">
|
||||
{{ item }}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Directive, Input, Output, EventEmitter, HostListener, ViewChild, ElementRef} from 'angular2/core';
|
||||
import {NgControl} from 'angular2/common';
|
||||
import {Directive, Input, Output, EventEmitter, HostListener, ViewChild, ElementRef} from '@angular/core';
|
||||
import {NgControl} from '@angular/common';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {Content} from '../content/content';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, Optional, ElementRef, ViewChild, ViewEncapsulation} from 'angular2/core';
|
||||
import {NgControl} from 'angular2/common';
|
||||
import {Component, Optional, ElementRef, ViewChild, ViewEncapsulation} from '@angular/core';
|
||||
import {NgControl} from '@angular/common';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {Content} from '../content/content';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Directive, Attribute, ElementRef, Renderer, Input, Output, EventEmitter, HostListener} from 'angular2/core';
|
||||
import {NgControl} from 'angular2/common';
|
||||
import {Directive, Attribute, ElementRef, Renderer, Input, Output, EventEmitter, HostListener} from '@angular/core';
|
||||
import {NgControl} from '@angular/common';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {CSS, hasFocus} from '../../util/dom';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {App} from '../../../../../ionic';
|
||||
import {FormBuilder, Validators} from 'angular2/common';
|
||||
import {FormBuilder, Validators} from '@angular/common';
|
||||
|
||||
|
||||
@App({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ElementRef} from 'angular2/core';
|
||||
import {ElementRef} from '@angular/core';
|
||||
import * as dom from '../util/dom';
|
||||
|
||||
let ids: number = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, Optional, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ElementRef, Optional, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {List} from '../list/list';
|
||||
|
||||
@ -12,7 +12,7 @@ import {List} from '../list/list';
|
||||
* @usage
|
||||
* ```html
|
||||
* <ion-list>
|
||||
* <ion-item-sliding *ngFor="#item of items">
|
||||
* <ion-item-sliding *ngFor="let item of items">
|
||||
* <button ion-item (click)="itemTapped(item)">
|
||||
* {{item.title}}
|
||||
* </button>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ContentChildren, forwardRef, ViewChild, ContentChild, Renderer, ElementRef, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ContentChildren, forwardRef, ViewChild, ContentChild, Renderer, ElementRef, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Button} from '../button/button';
|
||||
import {Form} from '../../util/form';
|
||||
|
@ -88,7 +88,7 @@
|
||||
<button outline item-right (click)="testClick($event)">View</button>
|
||||
</ion-item>
|
||||
|
||||
<button ion-item *ngFor="#data of [0,1,2,3,4]; #i = index" [class.activated]="i == 1" (click)="testClick($event)">
|
||||
<button ion-item *ngFor="let data of [0,1,2,3,4]; #i = index" [class.activated]="i == 1" (click)="testClick($event)">
|
||||
<ion-avatar item-left>
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==">
|
||||
</ion-avatar>
|
||||
|
@ -8,13 +8,13 @@
|
||||
<ion-content class="outer-content">
|
||||
|
||||
<ion-list>
|
||||
<ion-item-group *ngFor="#timeSlot of data">
|
||||
<ion-item-group *ngFor="let timeSlot of data">
|
||||
|
||||
<ion-item-divider sticky>
|
||||
{{timeSlot.time}}
|
||||
</ion-item-divider>
|
||||
|
||||
<ion-item-sliding *ngFor="#session of timeSlot.talks" [attr.category]="session.category" #slidingItem>
|
||||
<ion-item-sliding *ngFor="let session of timeSlot.talks" [attr.category]="session.category" #slidingItem>
|
||||
<button ion-item (click)="openSession(session)">
|
||||
<h3>{{session.name}}</h3>
|
||||
<p>
|
||||
|
@ -100,7 +100,7 @@
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
|
||||
<ion-item-sliding *ngFor="#data of items" #item>
|
||||
<ion-item-sliding *ngFor="let data of items" #item>
|
||||
<ion-item text-wrap detail-push>
|
||||
<h3>ng-for {{data}}</h3>
|
||||
</ion-item>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Renderer, Input, Optional, Attribute} from 'angular2/core';
|
||||
import {Directive, ElementRef, Renderer, Input, Optional, Attribute} from '@angular/core';
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Renderer, Attribute, NgZone} from 'angular2/core';
|
||||
import {Directive, ElementRef, Renderer, Attribute, NgZone} from '@angular/core';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {ItemSlidingGesture} from '../item/item-sliding-gesture';
|
||||
@ -53,7 +53,7 @@ export class List extends Ion {
|
||||
*
|
||||
* ```ts
|
||||
* import {Page, List} from 'ionic-angular';
|
||||
* import {ViewChild} from 'angular2/core';
|
||||
* import {ViewChild} from '@angular/core';
|
||||
* @Page...
|
||||
* export class MyClass {
|
||||
* @ViewChild(List) list: List;
|
||||
@ -88,7 +88,7 @@ export class List extends Ion {
|
||||
*
|
||||
* ```ts
|
||||
* import {Page, List} from 'ionic-angular';
|
||||
* import {ViewChild} from 'angular2/core';
|
||||
* import {ViewChild} from '@angular/core';
|
||||
* @Page...
|
||||
* export class MyClass {
|
||||
* @ViewChild(List) list: List;
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
<ion-content class="outer-content">
|
||||
|
||||
<ion-list class="outer-content" *ngFor="#person of people">
|
||||
<ion-list class="outer-content" *ngFor="let person of people">
|
||||
<ion-list-header>
|
||||
{{person.name}}
|
||||
</ion-list-header>
|
||||
<ion-item *ngFor="#component of person.components">
|
||||
<ion-item *ngFor="let component of person.components">
|
||||
{{component}}
|
||||
<div item-right>
|
||||
<ion-icon name="pin"></ion-icon>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item-group *ngFor="#group of groups">
|
||||
<ion-item-group *ngFor="let group of groups">
|
||||
<ion-item-divider sticky>{{group.title}}</ion-item-divider>
|
||||
<ion-item *ngFor="#item of group.items">
|
||||
<ion-item *ngFor="let item of group.items">
|
||||
{{item.title}}
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Animation} from '../../animations/animation';
|
||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, Input, HostListener} from 'angular2/core';
|
||||
import {Directive, Input, HostListener} from '@angular/core';
|
||||
|
||||
import {MenuController} from './menu-controller';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Optional, Input, HostListener} from 'angular2/core';
|
||||
import {Directive, ElementRef, Optional, Input, HostListener} from '@angular/core';
|
||||
|
||||
import {ViewController} from '../nav/view-controller';
|
||||
import {Navbar} from '../navbar/navbar';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, forwardRef, Directive, Host, EventEmitter, ElementRef, NgZone, Input, Output, Renderer, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, forwardRef, Directive, Host, EventEmitter, ElementRef, NgZone, Input, Output, Renderer, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {Config} from '../../config/config';
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<ion-list>
|
||||
|
||||
<button ion-item *ngFor="#p of pages" (click)="openPage(p)">
|
||||
<button ion-item *ngFor="let p of pages" (click)="openPage(p)">
|
||||
{{p.title}}
|
||||
</button>
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<ion-list>
|
||||
|
||||
<button ion-item *ngFor="#p of pages" (click)="openPage(p)">
|
||||
<button ion-item *ngFor="let p of pages" (click)="openPage(p)">
|
||||
{{p.title}}
|
||||
</button>
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {ViewContainerRef, DynamicComponentLoader, provide, ReflectiveInjector, ResolvedReflectiveProvider, ElementRef, NgZone, Renderer, Type} from 'angular2/core';
|
||||
import {wtfLeave, wtfCreateScope, WtfScopeFn, wtfStartTimeRange, wtfEndTimeRange} from 'angular2/instrumentation';
|
||||
import {ViewContainerRef, DynamicComponentLoader, provide, ReflectiveInjector, ResolvedReflectiveProvider, ElementRef, NgZone, Renderer, Type} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {Ion} from '../ion';
|
||||
@ -972,9 +971,6 @@ export class NavController extends Ion {
|
||||
return done(false);
|
||||
}
|
||||
|
||||
// lets time this sucker, ready go
|
||||
let wtfScope = wtfStartTimeRange('NavController#_transition', (enteringView && enteringView.name));
|
||||
|
||||
if (isBlank(opts)) {
|
||||
opts = {};
|
||||
}
|
||||
@ -1003,7 +999,6 @@ export class NavController extends Ion {
|
||||
// begin the multiple async process of transitioning to the entering view
|
||||
this._render(transId, enteringView, leavingView, opts, (hasCompleted: boolean) => {
|
||||
this._transFinish(transId, enteringView, leavingView, opts.direction, hasCompleted);
|
||||
wtfEndTimeRange(wtfScope);
|
||||
done(hasCompleted);
|
||||
});
|
||||
}
|
||||
@ -1432,8 +1427,6 @@ export class NavController extends Ion {
|
||||
* @private
|
||||
*/
|
||||
loadPage(view: ViewController, navbarContainerRef: ViewContainerRef, opts: NavOptions, done: Function) {
|
||||
let wtfTimeRangeScope = wtfStartTimeRange('NavController#loadPage', view.name);
|
||||
|
||||
if (!this._viewport || !view.componentType) {
|
||||
return;
|
||||
}
|
||||
@ -1445,8 +1438,6 @@ export class NavController extends Ion {
|
||||
|
||||
// load the page component inside the nav
|
||||
this._loader.loadNextToLocation(view.componentType, this._viewport, providers).then(component => {
|
||||
let wtfScope = wtfCreateScope('NavController#loadPage_After_Compile')();
|
||||
|
||||
// the ElementRef of the actual ion-page created
|
||||
let pageElementRef = component.location;
|
||||
|
||||
@ -1495,10 +1486,7 @@ export class NavController extends Ion {
|
||||
// used mainly by tabs
|
||||
opts.postLoad && opts.postLoad(view);
|
||||
|
||||
// complete wtf loggers
|
||||
wtfEndTimeRange(wtfTimeRangeScope);
|
||||
wtfLeave(wtfScope);
|
||||
|
||||
// our job is done here
|
||||
done(view);
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Optional, NgZone, Renderer, DynamicComponentLoader, ViewContainerRef} from 'angular2/core';
|
||||
import {Directive, ElementRef, Optional, NgZone, Renderer, DynamicComponentLoader, ViewContainerRef} from '@angular/core';
|
||||
|
||||
import {IonicApp} from '../app/app';
|
||||
import {Config} from '../../config/config';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, Optional, Input} from 'angular2/core';
|
||||
import {Directive, Optional, Input} from '@angular/core';
|
||||
import {NavController} from './nav-controller';
|
||||
import {NavRegistry} from './nav-registry';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Type} from 'angular2/core';
|
||||
import {Type} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -1,9 +1,7 @@
|
||||
import {Directive, ViewContainerRef, DynamicComponentLoader, Attribute} from 'angular2/core';
|
||||
import {Directive, ViewContainerRef, DynamicComponentLoader, Attribute} from '@angular/core';
|
||||
import {
|
||||
RouterOutlet,
|
||||
Router,
|
||||
ComponentInstruction,
|
||||
Instruction} from 'angular2/router';
|
||||
RouterOutletMap,
|
||||
Router} from '@angular/router';
|
||||
|
||||
import {Nav} from './nav';
|
||||
import {ViewController} from './view-controller';
|
||||
@ -14,114 +12,6 @@ import {ViewController} from './view-controller';
|
||||
@Directive({
|
||||
selector: 'ion-nav'
|
||||
})
|
||||
export class NavRouter extends RouterOutlet {
|
||||
private _lastUrl: string;
|
||||
private _nav: Nav;
|
||||
private _parent: Router;
|
||||
|
||||
constructor(
|
||||
viewContainerRef: ViewContainerRef,
|
||||
loader: DynamicComponentLoader,
|
||||
parentRouter: Router,
|
||||
@Attribute('name') nameAttr: string,
|
||||
nav: Nav
|
||||
) {
|
||||
if (nav.parent) {
|
||||
parentRouter = parentRouter.childRouter(nav);
|
||||
}
|
||||
super(viewContainerRef, loader, parentRouter, nameAttr);
|
||||
|
||||
this._nav = nav;
|
||||
this._parent = parentRouter;
|
||||
|
||||
// register this router with Ionic's NavController
|
||||
// Ionic's NavController will call this NavRouter's "stateChange"
|
||||
// method when the NavController has...changed its state
|
||||
nav.registerRouter(this);
|
||||
}
|
||||
|
||||
stateChange(direction: string, viewCtrl: ViewController) {
|
||||
// stateChange is called by Ionic's NavController
|
||||
// viewCtrl is Ionic's ViewController class, which has the properties "componentType" and "params"
|
||||
|
||||
// only do an update if there's an actual view change
|
||||
if (!viewCtrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get the best PathRecognizer for this view's componentType
|
||||
let pathRecognizer = this.getPathRecognizerByComponent(viewCtrl.componentType);
|
||||
if (pathRecognizer) {
|
||||
|
||||
// generate a componentInstruction from the view's PathRecognizer and params
|
||||
let componentInstruction = pathRecognizer.generate(viewCtrl.data);
|
||||
|
||||
// create a ResolvedInstruction from the componentInstruction
|
||||
let instruction = new ResolvedInstruction(componentInstruction, null, null);
|
||||
if (instruction) {
|
||||
let url = instruction.toRootUrl();
|
||||
if (url === this._lastUrl) return;
|
||||
|
||||
this._lastUrl = url;
|
||||
|
||||
this._parent.navigateByInstruction(instruction);
|
||||
|
||||
console.debug('NavRouter, stateChange, name:', viewCtrl.name, 'id:', viewCtrl.id, 'url:', url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
activate(nextInstruction: ComponentInstruction): Promise<any> {
|
||||
var previousInstruction = this['_currentInstruction'];
|
||||
this['_currentInstruction'] = nextInstruction;
|
||||
var componentType = nextInstruction.componentType;
|
||||
var childRouter = this._parent.childRouter(componentType);
|
||||
|
||||
// prevent double navigations to the same view
|
||||
let instruction = new ResolvedInstruction(nextInstruction, null, null);
|
||||
let url: string;
|
||||
if (instruction) {
|
||||
url = instruction.toRootUrl();
|
||||
if (url === this._lastUrl) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
console.debug('NavRouter, activate:', componentType.name, 'url:', url);
|
||||
|
||||
// tell the NavController which componentType, and it's params, to navigate to
|
||||
return this._nav.push(componentType, nextInstruction.params);
|
||||
}
|
||||
|
||||
reuse(nextInstruction: ComponentInstruction) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
getPathRecognizerByComponent(componentType) {
|
||||
// given a componentType, figure out the best PathRecognizer to use
|
||||
let rules = this._parent.registry['_rules'];
|
||||
|
||||
let pathRecognizer = null;
|
||||
rules.forEach((rule) => {
|
||||
pathRecognizer = rule.rules.find(function(routeRule) {
|
||||
return routeRule.handler.componentType === componentType;
|
||||
});
|
||||
});
|
||||
|
||||
return pathRecognizer;
|
||||
}
|
||||
export class NavRouter {
|
||||
|
||||
}
|
||||
|
||||
// TODO: hacked from
|
||||
// https://github.com/angular/angular/blob/6ddfff5cd59aac9099aa6da5118c5598eea7ea11/modules/angular2/src/router/instruction.ts#L207
|
||||
class ResolvedInstruction extends Instruction {
|
||||
constructor(public component: ComponentInstruction, public child: Instruction,
|
||||
public auxInstruction: {[key: string]: Instruction}) {
|
||||
super(component, child, auxInstruction);
|
||||
}
|
||||
|
||||
resolveComponent(): Promise<ComponentInstruction> {
|
||||
return Promise.resolve(this.component);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, ViewContainerRef, DynamicComponentLoader, Input, Optional, NgZone, Renderer, Type, ViewChild, ViewEncapsulation, AfterViewInit} from 'angular2/core';
|
||||
import {Component, ElementRef, ViewContainerRef, DynamicComponentLoader, Input, Optional, NgZone, Renderer, Type, ViewChild, ViewEncapsulation, AfterViewInit} from '@angular/core';
|
||||
|
||||
import {IonicApp} from '../app/app';
|
||||
import {Config} from '../../config/config';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Type, ViewChild} from 'angular2/core';
|
||||
import {Component, Type, ViewChild} from '@angular/core';
|
||||
import {App, NavController, Alert, Content} from '../../../../../ionic';
|
||||
import {Page, Config, IonicApp} from '../../../../../ionic';
|
||||
import {NavParams, ViewController} from '../../../../../ionic';;
|
||||
@ -49,7 +49,7 @@ class MyCmpTest{}
|
||||
<button ion-item (click)="quickPop()">New pop during transition</button>
|
||||
<button ion-item (click)="reload()">Reload</button>
|
||||
<button ion-item (click)="scrollToBottom()">Scroll to bottom</button>
|
||||
<button *ngFor="#i of pages" ion-item (click)="pushPrimaryHeaderPage()">Page {{i}}</button>
|
||||
<button *ngFor="let i of pages" ion-item (click)="pushPrimaryHeaderPage()">Page {{i}}</button>
|
||||
<button ion-item (click)="content.scrollToTop()">Scroll to top</button>
|
||||
</ion-list>
|
||||
<my-cmp></my-cmp>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {RouteConfig,} from 'angular2/router';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {Routes} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import {App, Page, NavParams, ViewController} from '../../../../../ionic';
|
||||
|
||||
@ -55,10 +55,10 @@ class View3Cmp {
|
||||
|
||||
|
||||
@App()
|
||||
@RouteConfig([
|
||||
{ path: '/', component: View1Cmp, as: 'First' },
|
||||
{ path: '/2', component: View2Cmp, as: 'Second' },
|
||||
{ path: '/3/:id', component: View3Cmp, as: 'Third' }
|
||||
@Routes([
|
||||
{ path: '/', component: View1Cmp },
|
||||
{ path: '/2', component: View2Cmp },
|
||||
{ path: '/3/:id', component: View3Cmp }
|
||||
])
|
||||
class InboxApp {
|
||||
constructor(private location: Location) {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Output, EventEmitter, Type, TemplateRef, ViewContainerRef, ElementRef, Renderer, ChangeDetectorRef} from 'angular2/core';
|
||||
import {Output, EventEmitter, Type, TemplateRef, ViewContainerRef, ElementRef, Renderer, ChangeDetectorRef} from '@angular/core';
|
||||
|
||||
import {Navbar} from '../navbar/navbar';
|
||||
import {NavController, NavOptions} from './nav-controller';
|
||||
@ -29,7 +29,7 @@ export class ViewController {
|
||||
private _leavingOpts: NavOptions = null;
|
||||
private _loaded: boolean = false;
|
||||
private _nbDir: Navbar;
|
||||
private _nbTmpRef: TemplateRef;
|
||||
private _nbTmpRef: TemplateRef<Object>;
|
||||
private _nbVwRef: ViewContainerRef;
|
||||
private _onDismiss: Function = null;
|
||||
private _pgRef: ElementRef;
|
||||
@ -263,14 +263,14 @@ export class ViewController {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
setNavbarTemplateRef(templateRef: TemplateRef) {
|
||||
setNavbarTemplateRef(templateRef: TemplateRef<Object>) {
|
||||
this._nbTmpRef = templateRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
getNavbarTemplateRef(): TemplateRef {
|
||||
getNavbarTemplateRef(): TemplateRef<Object> {
|
||||
return this._nbTmpRef;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Directive, Optional, ElementRef, Renderer, TemplateRef, forwardRef, Inject, ViewContainerRef, Input} from 'angular2/core';
|
||||
import {Component, Directive, Optional, ElementRef, Renderer, TemplateRef, forwardRef, Inject, ViewContainerRef, Input} from '@angular/core';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {Icon} from '../icon/icon';
|
||||
@ -232,7 +232,7 @@ export class Navbar extends ToolbarBase {
|
||||
export class NavbarTemplate {
|
||||
constructor(
|
||||
viewContainerRef: ViewContainerRef,
|
||||
templateRef: TemplateRef,
|
||||
templateRef: TemplateRef<Object>,
|
||||
@Optional() viewCtrl: ViewController
|
||||
) {
|
||||
if (viewCtrl) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, Input, Output, EventEmitter} from 'angular2/core';
|
||||
import {Directive, ElementRef, Input, Output, EventEmitter} from '@angular/core';
|
||||
|
||||
import {isPresent, isTrueProperty} from '../../util/util';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, Input, Output, EventEmitter, ViewChildren, QueryList, ViewChild, Renderer, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ElementRef, Input, Output, EventEmitter, ViewChildren, QueryList, ViewChild, Renderer, HostListener, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Animation} from '../../animations/animation';
|
||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||
@ -88,7 +88,7 @@ export class Picker extends ViewController {
|
||||
template:
|
||||
'<div *ngIf="col.prefix" class="picker-prefix" [style.width]="col.prefixWidth">{{col.prefix}}</div>' +
|
||||
'<div class="picker-opts" #colEle [style.width]="col.optionsWidth">' +
|
||||
'<button *ngFor="#o of col.options; #i=index" [style.transform]="o._trans" [style.transitionDuration]="o._dur" [class.picker-opt-selected]="col.selectedIndex === i" [class.picker-opt-disabled]="o.disabled" (click)="optClick($event, i)" type="button" category="picker-opt">' +
|
||||
'<button *ngFor="let o of col.options; let i=index;" (click)="optClick($event, i)" type="button" category="picker-opt">' +
|
||||
'{{o.text}}' +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
@ -342,7 +342,10 @@ class PickerColumnCmp {
|
||||
|
||||
this.col.selectedIndex = Math.max(Math.abs(Math.round(y / this.optHeight)), 0);
|
||||
|
||||
let colElements = this.colEle.nativeElement.querySelectorAll('.picker-opt');
|
||||
|
||||
for (var i = 0; i < this.col.options.length; i++) {
|
||||
var ele: HTMLElement = colElements[i];
|
||||
var opt = <any>this.col.options[i];
|
||||
var optTop = (i * this.optHeight);
|
||||
var optOffset = (optTop + y);
|
||||
@ -364,8 +367,11 @@ class PickerColumnCmp {
|
||||
translateY = optOffset;
|
||||
}
|
||||
|
||||
opt._trans = `rotateX(${rotateX}deg) translate3d(${translateX}px,${translateY}px,${translateZ}px)`;
|
||||
opt._dur = (duration > 0 ? duration + 'ms' : '');
|
||||
// TODO: setting by [style.transform]="o.transform" within the template is currently broke
|
||||
ele.style[CSS.transform] = `rotateX(${rotateX}deg) translate3d(${translateX}px,${translateY}px,${translateZ}px)`;
|
||||
ele.style[CSS.transitionDuration] = (duration > 0 ? duration + 'ms' : '');
|
||||
ele.classList[this.col.selectedIndex===i ? 'add' : 'remove']('picker-opt-selected');
|
||||
ele.classList[opt.disabled ? 'add' : 'remove']('picker-opt-disabled');
|
||||
}
|
||||
|
||||
if (saveY) {
|
||||
@ -436,7 +442,7 @@ class PickerColumnCmp {
|
||||
'<div (click)="bdClick()" tappable disable-activated class="backdrop" role="presentation"></div>' +
|
||||
'<div class="picker-wrapper">' +
|
||||
'<div class="picker-toolbar">' +
|
||||
'<div *ngFor="#b of d.buttons" class="picker-toolbar-button" [ngClass]="b.cssRole">' +
|
||||
'<div *ngFor="let b of d.buttons" class="picker-toolbar-button" [ngClass]="b.cssRole">' +
|
||||
'<button (click)="btnClick(b)" [ngClass]="b.cssClass" class="picker-button" clear>' +
|
||||
'{{b.text}}' +
|
||||
'</button>' +
|
||||
@ -444,7 +450,7 @@ class PickerColumnCmp {
|
||||
'</div>' +
|
||||
'<div class="picker-columns">' +
|
||||
'<div class="picker-above-highlight"></div>' +
|
||||
'<div *ngFor="#c of d.columns" [col]="c" class="picker-col" (change)="_colChange($event)"></div>' +
|
||||
'<div *ngFor="let c of d.columns" [col]="c" class="picker-col"> (change)="_colChange($event)"</div>' +
|
||||
'<div class="picker-below-highlight"></div>' +
|
||||
'</div>' +
|
||||
'</div>',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ViewEncapsulation} from 'angular2/core';
|
||||
import {ViewEncapsulation} from '@angular/core';
|
||||
import {App, Page, Picker, NavController} from '../../../../../ionic';
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Optional, Input, Output, HostListener, EventEmitter, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, Optional, Input, Output, HostListener, EventEmitter, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Form} from '../../util/form';
|
||||
import {isTrueProperty, isPresent, isBlank, isCheckedProperty} from '../../util/util';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Directive, ElementRef, Renderer, Optional, Input, Output, Provider, forwardRef, HostListener, ContentChild, EventEmitter} from 'angular2/core';
|
||||
import {NG_VALUE_ACCESSOR} from 'angular2/common';
|
||||
import {Directive, ElementRef, Renderer, Optional, Input, Output, Provider, forwardRef, HostListener, ContentChild, EventEmitter} from '@angular/core';
|
||||
import {NG_VALUE_ACCESSOR} from '@angular/common';
|
||||
|
||||
import {RadioButton} from './radio-button';
|
||||
import {ListHeader} from '../list/list';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {App} from '../../../../../ionic';
|
||||
import {Control, ControlGroup} from 'angular2/common';
|
||||
import {Control, ControlGroup} from '@angular/common';
|
||||
|
||||
|
||||
@App({
|
||||
|
@ -69,7 +69,7 @@
|
||||
<ion-list-header id="currencies">
|
||||
Currencies
|
||||
</ion-list-header>
|
||||
<ion-item *ngFor="#currency of currencies">
|
||||
<ion-item *ngFor="let currency of currencies">
|
||||
<ion-label>{{currency}}</ion-label>
|
||||
<ion-radio [value]="currency"></ion-radio>
|
||||
</ion-item>
|
||||
@ -111,7 +111,7 @@
|
||||
</div>
|
||||
|
||||
<ion-list radio-group [(ngModel)]="someValue">
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-item *ngFor="let item of items">
|
||||
<ion-label>
|
||||
{{ item.description }}
|
||||
</ion-label>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Input, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, Input, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {Refresher} from './refresher';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef, EventEmitter, Host, Input, Output, NgZone} from 'angular2/core';
|
||||
import {Directive, ElementRef, EventEmitter, Host, Input, Output, NgZone} from '@angular/core';
|
||||
|
||||
import {Content} from '../content/content';
|
||||
import {Icon} from '../icon/icon';
|
||||
|
@ -13,7 +13,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<ion-list>
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-item *ngFor="let item of items">
|
||||
{{ item }}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ElementRef, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {Gesture} from '../../gestures/gesture';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {ElementRef, Component, Directive, Host, HostBinding, HostListener, ViewChild, Input, Output, EventEmitter, Optional, ViewEncapsulation} from 'angular2/core';
|
||||
import {NgControl} from 'angular2/common';
|
||||
import {ElementRef, Component, Directive, Host, HostBinding, HostListener, ViewChild, Input, Output, EventEmitter, Optional, ViewEncapsulation} from '@angular/core';
|
||||
import {NgControl} from '@angular/common';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {Config} from '../../config/config';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from '@angular/common';
|
||||
|
||||
import {App} from '../../../../../ionic';
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<ion-content>
|
||||
<ion-searchbar [(ngModel)]="searchQuery" (input)="getItems($event)"></ion-searchbar>
|
||||
<ion-list>
|
||||
<ion-item *ngFor="#item of items">
|
||||
<ion-item *ngFor="let item of items">
|
||||
{{ item }}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Directive, Component, ElementRef, Renderer, Optional, EventEmitter, Input, Output, HostListener, ContentChildren, QueryList, ViewEncapsulation} from 'angular2/core';
|
||||
import {NgControl} from 'angular2/common';
|
||||
import {Directive, Component, ElementRef, Renderer, Optional, EventEmitter, Input, Output, HostListener, ContentChildren, QueryList, ViewEncapsulation} from '@angular/core';
|
||||
import {NgControl} from '@angular/common';
|
||||
|
||||
import {isTrueProperty, isPresent} from '../../util/util';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from '@angular/common';
|
||||
|
||||
import {App, IonicApp} from '../../../../../ionic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Validators, Control, ControlGroup} from 'angular2/common';
|
||||
import {Validators, Control, ControlGroup} from '@angular/common';
|
||||
import {App, Page, NavController} from '../../../../../ionic';
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Validators, Control, ControlGroup} from 'angular2/common';
|
||||
import {Http} from 'angular2/http';
|
||||
import {Validators, Control, ControlGroup} from '@angular/common';
|
||||
import {Http} from '@angular/http';
|
||||
import {App, Page, IonicApp, NavController} from '../../../../../ionic';
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
<ion-content padding>
|
||||
|
||||
<ion-slides (change)="onSlideChanged($event)" id="loopSlider">
|
||||
<ion-slide *ngFor="#slide of slides">
|
||||
<ion-slide *ngFor="let slide of slides">
|
||||
<h1>{{ slide.title }}</h1>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, Optional, ElementRef, Renderer, Input, Output, Provider, forwardRef, EventEmitter, HostListener, ContentChildren, QueryList, ViewEncapsulation} from 'angular2/core';
|
||||
import {NG_VALUE_ACCESSOR} from 'angular2/common';
|
||||
import {Component, Optional, ElementRef, Renderer, Input, Output, Provider, forwardRef, EventEmitter, HostListener, ContentChildren, QueryList, ViewEncapsulation} from '@angular/core';
|
||||
import {NG_VALUE_ACCESSOR} from '@angular/common';
|
||||
|
||||
import {Alert} from '../alert/alert';
|
||||
import {ActionSheet} from '../action-sheet/action-sheet';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {App, Page} from '../../../../../ionic';
|
||||
import {Control, ControlGroup} from 'angular2/common';
|
||||
import {Control, ControlGroup} from '@angular/common';
|
||||
|
||||
|
||||
@Page({
|
||||
|
@ -35,7 +35,7 @@
|
||||
<ion-item>
|
||||
<ion-label>Pets</ion-label>
|
||||
<ion-select [(ngModel)]="pets" multiple>
|
||||
<ion-option *ngFor="#o of petOptions" [value]="o.value">{{o.text}}</ion-option>
|
||||
<ion-option *ngFor="let o of petOptions" [value]="o.value">{{o.text}}</ion-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {NgFor} from 'angular2/common';
|
||||
import {NgFor} from '@angular/common';
|
||||
|
||||
import {App, Page} from '../../../../../ionic';
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
<ion-option value="12">December</ion-option>
|
||||
</ion-select>
|
||||
<ion-select [(ngModel)]="year">
|
||||
<ion-option *ngFor="#yr of years">{{yr}}</ion-option>
|
||||
<ion-option *ngFor="let yr of years">{{yr}}</ion-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, Attribute, NgZone} from 'angular2/core';
|
||||
import {Directive, Attribute, NgZone} from '@angular/core';
|
||||
|
||||
import {Platform} from '../../platform/platform';
|
||||
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
NgControlName,
|
||||
NgFormModel,
|
||||
FormBuilder
|
||||
} from 'angular2/common';
|
||||
} from '@angular/common';
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Directive, Component, ElementRef, Renderer, Host, EventEmitter, Input, Output, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {NgClass} from 'angular2/common';
|
||||
import {Directive, Component, ElementRef, Renderer, Host, EventEmitter, Input, Output, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {NgClass} from '@angular/common';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {Animation} from '../../animations/animation';
|
||||
@ -121,7 +121,7 @@ import {Scroll} from '../scroll/scroll';
|
||||
* Next, we can use `ViewChild` to assign the Slides instance to `slider`:
|
||||
*
|
||||
* ```ts
|
||||
* import {ViewChild} from 'angular2/core';
|
||||
* import {ViewChild} from '@angular/core';
|
||||
*
|
||||
* class MyPage {
|
||||
* @ViewChild('mySlider') slider: Slides;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {ViewChild} from 'angular2/core';
|
||||
import {Http} from 'angular2/http';
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {Http} from '@angular/http';
|
||||
import {App, Slides} from '../../../../../ionic';
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<ion-slides [options]="mySlideOptions" id="slider" style="background-color: black">
|
||||
<ion-slide *ngFor="#image of images">
|
||||
<ion-slide *ngFor="let image of images">
|
||||
<img data-src="{{getImageUrl(image)}}" slide-lazy>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ViewChild} from 'angular2/core';
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {App, Page, Slides} from '../../../../../ionic';
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ViewChild} from 'angular2/core';
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {App, Slides} from '../../../../../ionic';
|
||||
|
||||
@App({
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="slides-div">
|
||||
<ion-slides [options]="myTopSlideOptions" #loopSlider (didChange)="onSlideChanged($event)" pager>
|
||||
<ion-slide *ngFor="#slide of slides" [ngClass]="slide.class">
|
||||
<ion-slide *ngFor="let slide of slides" [ngClass]="slide.class">
|
||||
Loop {{ slide.name }}
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<div class="slides-div">
|
||||
<ion-slides (didChange)="onSlideChanged($event)" pager>
|
||||
<ion-slide *ngFor="#slide of slides" [ngClass]="slide.class">
|
||||
<ion-slide *ngFor="let slide of slides" [ngClass]="slide.class">
|
||||
Don't Loop {{ slide.name }}
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</ion-slides>
|
||||
</div>
|
||||
<ion-list>
|
||||
<button ion-item *ngFor="#item of [0,1,2,3,4,5,6,7,8]">
|
||||
<button ion-item *ngFor="let item of [0,1,2,3,4,5,6,7,8]">
|
||||
{{ item }}
|
||||
</button>
|
||||
</ion-list>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component, Input, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
||||
import {NgStyle} from 'angular2/common';
|
||||
import {Component, Input, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {NgStyle} from '@angular/common';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
|
||||
@ -100,10 +100,10 @@ import {Config} from '../../config/config';
|
||||
@Component({
|
||||
selector: 'ion-spinner',
|
||||
template:
|
||||
'<svg viewBox="0 0 64 64" *ngFor="#i of _c" [ngStyle]="i.style">' +
|
||||
'<svg viewBox="0 0 64 64" *ngFor="let i of _c" [ngStyle]="i.style">' +
|
||||
'<circle [attr.r]="i.r" transform="translate(32,32)"></circle>' +
|
||||
'</svg>' +
|
||||
'<svg viewBox="0 0 64 64" *ngFor="#i of _l" [ngStyle]="i.style">' +
|
||||
'<svg viewBox="0 0 64 64" *ngFor="let i of _l" [ngStyle]="i.style">' +
|
||||
'<line [attr.y1]="i.y1" [attr.y2]="i.y2" transform="translate(32,32)"></line>' +
|
||||
'</svg>',
|
||||
directives: [NgStyle],
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Directive, ElementRef, Optional, Host, forwardRef, ViewContainerRef, HostListener, EventEmitter, Output, Input, Renderer} from 'angular2/core';
|
||||
import {Component, Directive, ElementRef, Optional, Host, forwardRef, ViewContainerRef, HostListener, EventEmitter, Output, Input, Renderer} from '@angular/core';
|
||||
|
||||
import {Tab} from './tab';
|
||||
import {Ion} from '../ion';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, ElementRef} from 'angular2/core';
|
||||
import {Directive, ElementRef} from '@angular/core';
|
||||
|
||||
import {rafFrames} from '../../util/dom';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Inject, forwardRef, ElementRef, NgZone, Renderer, DynamicComponentLoader, ViewContainerRef, ViewChild, Type, ViewEncapsulation, ChangeDetectorRef, EventEmitter, Input, Output} from 'angular2/core';
|
||||
import {Component, Inject, forwardRef, ElementRef, NgZone, Renderer, DynamicComponentLoader, ViewContainerRef, ViewChild, Type, ViewEncapsulation, ChangeDetectorRef, EventEmitter, Input, Output} from '@angular/core';
|
||||
|
||||
import {IonicApp} from '../app/app';
|
||||
import {Config} from '../../config/config';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Directive, ElementRef, Optional, Host, forwardRef, ViewContainerRef, ViewChild, ViewChildren, EventEmitter, Output, Input, Renderer, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, Directive, ElementRef, Optional, Host, forwardRef, ViewContainerRef, ViewChild, ViewChildren, EventEmitter, Output, Input, Renderer, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {IonicApp} from '../app/app';
|
||||
import {Config} from '../../config/config';
|
||||
@ -138,7 +138,7 @@ import {isBlank, isTrueProperty} from '../../util/util';
|
||||
'</ion-navbar-section>' +
|
||||
'<ion-tabbar-section>' +
|
||||
'<tabbar role="tablist">' +
|
||||
'<a *ngFor="#t of _tabs" [tab]="t" class="tab-button" [class.tab-disabled]="!t.enabled" [class.tab-hidden]="!t.show" role="tab">' +
|
||||
'<a *ngFor="let t of _tabs" [tab]="t" class="tab-button" [class.tab-disabled]="!t.enabled" [class.tab-hidden]="!t.show" role="tab">' +
|
||||
'<ion-icon *ngIf="t.tabIcon" [name]="t.tabIcon" [isActive]="t.isSelected" class="tab-button-icon"></ion-icon>' +
|
||||
'<span *ngIf="t.tabTitle" class="tab-button-text">{{t.tabTitle}}</span>' +
|
||||
'<ion-badge *ngIf="t.tabBadge" class="tab-badge" [ngClass]="\'badge-\' + t.tabBadgeStyle">{{t.tabBadge}}</ion-badge>' +
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {ViewChild} from 'angular2/core';
|
||||
import {RouteConfig} from 'angular2/router';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {ViewChild} from '@angular/core';
|
||||
import {RouteConfig} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import {App, Page, NavController, NavParams, Modal, ViewController, Tabs} from '../../../../../ionic';
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
<ion-list>
|
||||
<ion-list-header>Tracks</ion-list-header>
|
||||
|
||||
<ion-item *ngFor="#i of items">
|
||||
<ion-item *ngFor="let i of items">
|
||||
<ion-label>Toggle {{i}}</ion-label>
|
||||
<ion-toggle secondary></ion-toggle>
|
||||
</ion-item>
|
||||
@ -66,7 +66,7 @@ class MyModal {
|
||||
<ion-list-header>
|
||||
Tab 1
|
||||
</ion-list-header>
|
||||
<ion-item *ngFor="#i of items">Item {{i}} {{i}} {{i}} {{i}}</ion-item>
|
||||
<ion-item *ngFor="let i of items">Item {{i}} {{i}} {{i}} {{i}}</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
`
|
||||
@ -91,7 +91,7 @@ export class Tab1 {
|
||||
</ion-navbar>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item-sliding *ngFor="#session of sessions" #slidingItem>
|
||||
<ion-item-sliding *ngFor="let session of sessions" #slidingItem>
|
||||
<ion-item>
|
||||
<h3>{{session.name}} {{session.name}} {{session.name}}</h3>
|
||||
<p>{{session.location}} {{session.location}} {{session.location}}</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {App, Page, NavController, Tab} from '../../../../../ionic';
|
||||
|
||||
import {ContentChild, QueryList, ViewChildren} from 'angular2/core';
|
||||
import {ContentChild, QueryList, ViewChildren} from '@angular/core';
|
||||
|
||||
//
|
||||
// Tab 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable, NgZone} from 'angular2/core';
|
||||
import {Injectable, NgZone} from '@angular/core';
|
||||
|
||||
import {IonicApp} from '../app/app';
|
||||
import {Config} from '../../config/config';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ElementRef, Renderer, Output, EventEmitter} from 'angular2/core';
|
||||
import {Component, ElementRef, Renderer, Output, EventEmitter} from '@angular/core';
|
||||
|
||||
import {ActionSheet, ActionSheetOptions} from '../action-sheet/action-sheet';
|
||||
import {Animation} from '../../animations/animation';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user