mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
Merge branch 'alpha50' into css-refactor
This commit is contained in:
@ -7,12 +7,20 @@ import * as helpers from './helpers';
|
||||
|
||||
@App({
|
||||
templateUrl: 'app.html',
|
||||
config: {
|
||||
platforms: {
|
||||
android: {
|
||||
activator: 'ripple'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
class DemoApp {
|
||||
|
||||
rootPage: any;
|
||||
androidAttribute: any;
|
||||
|
||||
|
||||
constructor(app: IonicApp, platform: Platform) {
|
||||
this.app = app;
|
||||
this.platform = platform;
|
||||
|
@ -42,14 +42,14 @@ export class IdRef {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.app.register(this.id, this.component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.app.unregister(this.id);
|
||||
}
|
||||
}
|
||||
@ -75,7 +75,7 @@ export class Attr {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.renderer.setElementAttribute(this.elementRef, this.attr, '');
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ export class Checkbox {
|
||||
if (ngControl) ngControl.valueAccessor = this;
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.labelId = 'label-' + this.inputId;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ export class Checkbox {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.form.deregister(this);
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ export class Content extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
this.scrollElement = this.getNativeElement().children[0];
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ export class Icon {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
let ele = this.elementRef.nativeElement;
|
||||
|
||||
if (this.mode == 'ios' && this.ios) {
|
||||
|
@ -14,7 +14,7 @@ export class Ion {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
let cls = this.constructor;
|
||||
|
||||
if (cls.defaultInputs && this.config) {
|
||||
|
@ -39,8 +39,8 @@ export class List extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
|
||||
if (util.isDefined(this.virtual)) {
|
||||
console.log('Content', this.content);
|
||||
@ -53,7 +53,7 @@ export class List extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.ele = null;
|
||||
this.slidingGesture && this.slidingGesture.unlisten();
|
||||
}
|
||||
@ -104,7 +104,7 @@ export class List extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
afterViewInit() {
|
||||
ngAfterViewInit() {
|
||||
this._init = true;
|
||||
if (this._enableSliding) {
|
||||
this.enableSlidingItems(true);
|
||||
|
@ -67,7 +67,7 @@ export class MenuType {
|
||||
return promise;
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.open && this.open.dispose();
|
||||
this.close && this.close.dispose();
|
||||
this.seek && this.seek.dispose();
|
||||
|
@ -92,8 +92,8 @@ export class Menu extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
let self = this;
|
||||
|
||||
let content = self.content;
|
||||
@ -352,11 +352,11 @@ export class Menu extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.app.unregister(this.id);
|
||||
this._gesture && this._gesture.destroy();
|
||||
this._targetGesture && this._targetGesture.destroy();
|
||||
this._type && this._type.onDestroy();
|
||||
this._type && this._type.ngOnDestroy();
|
||||
this._cntEle = null;
|
||||
}
|
||||
|
||||
|
@ -84,8 +84,8 @@ export class NavRouter extends RouterOutlet {
|
||||
// generate a componentInstruction from the view's PathRecognizer and params
|
||||
let componentInstruction = pathRecognizer.generate(viewCtrl.params.data);
|
||||
|
||||
// create an Instruction from the componentInstruction
|
||||
let instruction = new Instruction(componentInstruction, null);
|
||||
// create a ResolvedInstruction from the componentInstruction
|
||||
let instruction = new ResolvedInstruction(componentInstruction, null);
|
||||
|
||||
this._parentRouter.navigateByInstruction(instruction);
|
||||
}
|
||||
@ -113,3 +113,16 @@ export class NavRouter extends RouterOutlet {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
resolveComponent(): Promise<ComponentInstruction> {
|
||||
return Promise.resolve(this.component);
|
||||
}
|
||||
}
|
||||
|
@ -136,8 +136,8 @@ export class Nav extends NavController {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
|
||||
if (this.root) {
|
||||
if (typeof this.root !== 'function') {
|
||||
|
@ -114,8 +114,8 @@ export class Navbar extends ToolbarBase {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
let hideBackButton = this.hideBackButton;
|
||||
if (typeof hideBackButton === 'string') {
|
||||
this.hideBackButton = (hideBackButton === '' || hideBackButton === 'true');
|
||||
|
@ -300,7 +300,7 @@ class PopupCmp {
|
||||
}
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
setTimeout(() => {
|
||||
// TODO: make more better, no DOM BS
|
||||
this.promptInput = this.elementRef.nativeElement.querySelector('input');
|
||||
|
@ -72,7 +72,7 @@ export class RadioGroup extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
let header = this.headerQuery.first;
|
||||
if (header) {
|
||||
if (!header.id) {
|
||||
@ -210,8 +210,8 @@ export class RadioButton extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
this.group.registerRadio(this);
|
||||
this.labelId = 'label-' + this.id;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ export class Refresher {
|
||||
this.pulling = new EventEmitter('pulling');
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.initEvents();
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ export class Scroll extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.scrollElement = this.getNativeElement().children[0];
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ export class Searchbar extends Ion {
|
||||
* After the view has initialized check if the searchbar has a value
|
||||
* and then store that value in query
|
||||
*/
|
||||
afterViewInit() {
|
||||
ngAfterViewInit() {
|
||||
// If the user passes in a value to the model we should left align
|
||||
this.shouldLeftAlign = this.ngControl.value && this.ngControl.value.trim() != '';
|
||||
this.query = this.ngControl.value || '';
|
||||
|
@ -196,7 +196,7 @@ export class SegmentButton {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.segment.register(this);
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ export class Slides extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
if(!this.options) {
|
||||
this.options = {};
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class MyApp {
|
||||
})
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
setTimeout(() => {
|
||||
this.slider = this.app.getComponent('slider');
|
||||
console.log('Got slider', this.slider);
|
||||
|
@ -160,7 +160,7 @@ export class Switch {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.labelId = 'label-' + this.inputId;
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ export class Switch {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.removeMoveListener();
|
||||
this.switchEle = this.addMoveListener = this.removeMoveListener = null;
|
||||
this.form.deregister(this);
|
||||
|
@ -79,7 +79,7 @@ export class Tab extends NavController {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
if (this._isInitial) {
|
||||
this.parent.select(this);
|
||||
|
||||
@ -173,7 +173,7 @@ export class Tab extends NavController {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
clearTimeout(this._loadTimer);
|
||||
}
|
||||
|
||||
|
@ -110,8 +110,8 @@ export class Tabs extends Ion {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
this.preloadTabs = (this.preloadTabs !== "false" && this.preloadTabs !== false);
|
||||
|
||||
if (this._highlight) {
|
||||
@ -277,7 +277,7 @@ class TabButton extends Ion {
|
||||
this.disHover = (config.get('hoverCSS') === false);
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.tab.btn = this;
|
||||
this.hasTitle = !!this.tab.tabTitle;
|
||||
this.hasIcon = !!this.tab.tabIcon;
|
||||
|
@ -109,7 +109,7 @@ class QuesaritoPage {
|
||||
export class TabsPage {
|
||||
@ViewChildren(Tab) tab : QueryList<Tab>;
|
||||
|
||||
afterViewInit() {
|
||||
ngAfterViewInit() {
|
||||
console.log('Tab', this.tab);
|
||||
console.log(this.tab.first.setRoot);
|
||||
}
|
||||
@ -128,6 +128,6 @@ export class TabsPage {
|
||||
this.root2 = Tab2;
|
||||
this.root3 = Tab3;
|
||||
}
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ export class TextInput {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
if (this.input && this.label) {
|
||||
// if there is an input and an label
|
||||
// then give the label an ID
|
||||
@ -443,7 +443,7 @@ export class TextInput {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDestroy() {
|
||||
ngOnDestroy() {
|
||||
this.deregMove();
|
||||
this.form.deregister(this);
|
||||
}
|
||||
@ -486,7 +486,7 @@ export class TextInputElement {
|
||||
}
|
||||
}
|
||||
|
||||
onInit() {
|
||||
ngOnInit() {
|
||||
this.wrapper && this.wrapper.hasValue(this.value);
|
||||
}
|
||||
|
||||
|
@ -20,14 +20,15 @@
|
||||
"tooling"
|
||||
],
|
||||
"dependencies": {
|
||||
"@reactivex/rxjs": "5.0.0-alpha.7",
|
||||
"angular2": "tlancina/angular-package",
|
||||
"angular2": "2.0.0-alpha.50",
|
||||
"colors": "^1.1.2",
|
||||
"es6-promise": "^3.0.2",
|
||||
"es6-shim": "0.33.6",
|
||||
"inquirer": "0.11.0",
|
||||
"lodash": "3.10.1",
|
||||
"q": "1.4.1",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-alpha.14",
|
||||
"shelljs": "0.5.3",
|
||||
"zone.js": "0.5.8"
|
||||
},
|
||||
|
@ -86,7 +86,7 @@
|
||||
"*": "*.js",
|
||||
"ionic/*": "ionic/*",
|
||||
"angular2/*": "angular2/*",
|
||||
"rx": "rx"
|
||||
"rxjs/*": "rxjs/*"
|
||||
}
|
||||
})
|
||||
System.import("index").then(function(m) {}, console.error.bind(console));
|
||||
|
Reference in New Issue
Block a user