remove ionic view

This commit is contained in:
Adam Bradley
2015-05-04 09:17:17 -05:00
parent f922314b3b
commit 300c6f2cb8
68 changed files with 197 additions and 319 deletions

View File

@@ -22,4 +22,3 @@ export * from 'ionic/components/nav/nav-item'
export * from 'ionic/components/tabs/tabs'
export * from 'ionic/components/tabs/tab'
export * from 'ionic/components/toolbar/toolbar'
export * from 'ionic/components/view/view'

View File

@@ -1,4 +1,4 @@
// import {NgElement, Component, View as NgView, Parent} from 'angular2/angular2'
// import {NgElement, Component, View, Parent} from 'angular2/angular2'
// import {IonicComponent} from 'ionic/config/component'
// import {Icon} from 'ionic/components/icon/icon'
// import {Item} from 'ionic/components/item/item'
@@ -7,7 +7,7 @@
// @Component({
// selector: 'ion-action-menu'
// })
// @NgView({
// @View({
// template: `
// <div class="overlay-backdrop"></div>
// <div class="overlay-container">

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {Component, View, bootstrap} from 'angular2/angular2';
import {ActionMenu} from 'ionic/components/action-menu/action-menu';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [ActionMenu]
})

View File

@@ -1,11 +1,11 @@
// import {NgElement, Component, View as NgView, Parent} from 'angular2/angular2'
// import {NgElement, Component, View, Parent} from 'angular2/angular2'
// import {IonicComponent} from 'ionic/config/component'
// @Component({
// selector: 'ion-alert'
// })
// @NgView({
// @View({
// template: `
// <div class="overlay-backdrop"></div>
// <div class="overlay-container">

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Alert} from 'ionic/components/alert/alert';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Alert]
})

View File

@@ -1,4 +1,4 @@
import {Component, Decorator, View as NgView, NgElement, bootstrap} from 'angular2/angular2';
import {Component, Decorator, View, NgElement, bootstrap} from 'angular2/angular2';
import {Animation} from 'ionic/ionic';
let opacity = 0.2;
@@ -7,7 +7,7 @@ let translateX = '100px';
let scale = 0.6;
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html'
})
class IonicApp {

View File

@@ -1,15 +1,15 @@
//import {Router} from 'ionic/routing/router'
import {For, Component, View as NgView, Parent, bootstrap} from 'angular2/angular2'
import {For, Component, View, Parent, bootstrap} from 'angular2/angular2'
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
import {Log} from 'ionic/util'
import {Router, List, Item, Nav, View, Button, Input, Tabs, Tab, Content, Aside} from 'ionic/ionic'
import {Router, List, Item, Nav, Button, Input, Tabs, Tab, Content, Aside} from 'ionic/ionic'
@Component({
selector: 'login-page'
})
@NgView({
@View({
templateUrl: 'pages/login.html',
directives: [View, FormDirectives, Button, Input]
directives: [FormDirectives, Button, Input]
})
export class LoginPage {
constructor( @Parent() viewport: Nav ) { //, fb: FormBuilder ) {
@@ -41,9 +41,9 @@ export class LoginPage {
@Component({
selector: 'signup-page'
})
@NgView({
@View({
templateUrl: 'pages/signup.html',
directives: [View, FormDirectives, Button, Input]
directives: [FormDirectives, Button, Input]
})
export class SignupPage {
constructor( @Parent() viewport: Nav ) { //, fb: FormBuilder ) {
@@ -78,9 +78,9 @@ export class SignupPage {
@Component({
selector: 'app-page'
})
@NgView({
@View({
templateUrl: 'pages/app.html',
directives: [View, FormDirectives, Button, Input, Tabs, Tab]
directives: [FormDirectives, Button, Input, Tabs, Tab]
})
export class AppPage {
constructor( @Parent() viewport: Nav ) { //, fb: FormBuilder ) {
@@ -90,9 +90,9 @@ export class AppPage {
}
@Component({ selector: 'stream-tab' })
@NgView({
@View({
templateUrl: 'pages/tabs/home.html',
directives: [For, View, Content, List, Item]
directives: [For, Content, List, Item]
})
class StreamTab {
constructor(@Parent() viewport: Nav) {
@@ -114,9 +114,9 @@ class StreamTab {
}
@Component({ selector: 'post-detail-tab' })
@NgView({
@View({
templateUrl: 'pages/post/detail.html',
directives: [View, Content]
directives: [Content]
})
class PostDetail {
constructor(@Parent() viewport: Nav) {
@@ -129,9 +129,9 @@ class PostDetail {
}
@Component({ selector: 'splash-page' })
@NgView({
@View({
templateUrl: 'pages/splash.html',
directives: [View, Content]
directives: [Content]
})
class SplashPage {
constructor(@Parent() viewport: Nav) {
@@ -145,7 +145,7 @@ class SplashPage {
* Main app entry point
*/
@Component({ selector: '[ion-app]' })
@NgView({
@View({
directives: [Nav],
templateUrl: 'main.html'
})

View File

@@ -1,14 +1,14 @@
import {Descendent, NgElement, Component, View as NgView, bootstrap} from 'angular2/angular2';
import {Descendent, NgElement, Component, View, bootstrap} from 'angular2/angular2';
import {bind} from 'angular2/di';
import {View, Content, Nav, NavPane} from 'ionic/ionic';
import {Content, Nav, NavPane} from 'ionic/ionic';
import {HackerNews} from 'hn';
import {HNTopStories} from 'pages/top';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, Nav, NavPane]
directives: [Content, Nav, NavPane]
})
export class HNApp {
constructor(

View File

@@ -1,12 +1,12 @@
import {For, Ancestor, Descendent, Parent, NgElement, Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View, Content, Nav, NavPane, List, Item} from 'ionic/ionic';
import {For, Ancestor, Descendent, Parent, NgElement, Component, View, bootstrap} from 'angular2/angular2';
import {Content, Nav, NavPane, List, Item} from 'ionic/ionic';
import {HackerNews} from 'hn'
@Component({ selector: 'top-stories' })
@NgView({
@View({
templateUrl: 'pages/top.html',
directives: [View, Content, For, List, Item]
directives: [Content, For, List, Item]
})
export class HNSinglePost {
constructor(@Parent() viewport: Nav) {//, @Ancestor() app: HNApp) {

View File

@@ -1,12 +1,13 @@
import {For, Ancestor, Descendent, Parent, NgElement, Component, View as NgView, bootstrap} from 'angular2/angular2';
import {PushToNav, View, Content, Nav, NavPane, List, Item} from 'ionic/ionic';
import {For, Ancestor, Descendent, Parent, NgElement, Component, View, bootstrap} from 'angular2/angular2';
import {PushToNav, Content, Nav, NavPane, List, Item} from 'ionic/ionic';
import {HackerNews} from 'hn'
@Component({ selector: 'top-stories' })
@NgView({
@View({
templateUrl: 'pages/top.html',
directives: [View, Content, For, List, Item, PushToNav]
directives: [Content, For, List, Item, PushToNav]
})
export class HNTopStories {
constructor(@Ancestor() viewport: Nav) {//, @Ancestor() app: HNApp) {
@@ -72,7 +73,7 @@ export class HNTopStories {
//doStuffEnd
}
}
/*
HackerNews.getTopStories((val) => {

View File

@@ -1,7 +1,7 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html'
})
class IonicApp {

View File

@@ -1,4 +1,4 @@
import {Component, View as NgView, Inject, Parent, NgElement, EventEmitter} from 'angular2/angular2'
import {Component, View, Inject, Parent, NgElement, EventEmitter} from 'angular2/angular2'
import * as types from 'ionic/components/aside/extensions/types'
import * as gestures from 'ionic/components/aside/extensions/gestures'
import {dom} from 'ionic/util'
@@ -16,7 +16,7 @@ import {IonicComponent} from 'ionic/config/component'
dragThreshold: 'dragThreshold'
}
})
@NgView({
@View({
template: `<content></content>`
})
export class Aside {

View File

@@ -1,13 +1,13 @@
import {Aside} from 'ionic/components/aside/aside';
import {Content} from 'ionic/components/content/content';
import {View} from 'ionic/components/view/view';
import {View as NgView, Component, bootstrap} from 'angular2/angular2';
import {View, Component, bootstrap} from 'angular2/angular2';
@Component({
selector: '[ion-app]'
})
@NgView({
directives: [Aside, Content, View],
@View({
directives: [Aside, Content],
templateUrl: 'main.html'
})
class App {

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,9 +1,9 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [Button]
})

View File

@@ -1,13 +1,12 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, List]
directives: [Content, List]
})
class IonicApp {
constructor() {

View File

@@ -1,4 +1,4 @@
import {Component, View as NgView, NgElement} from 'angular2/angular2'
import {Component, View, NgElement} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@@ -11,7 +11,7 @@ import {IonicComponent} from 'ionic/config/component'
'^click': 'onClick()'
}
})
@NgView({
@View({
template: `
<div class="item-media media-checkbox">
<icon class="checkbox-off"></icon>

View File

@@ -1,14 +1,13 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Icon} from 'ionic/components/icon/icon';
import {Checkbox} from 'ionic/components/checkbox/checkbox';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, Icon, Checkbox, List]
directives: [Content, Icon, Checkbox, List]
})
class IonicApp {
constructor() {

View File

@@ -1,13 +1,13 @@
import {
NgElement,
Component,
View as NgView,
View,
} from 'angular2/angular2';
@Component({
selector: 'ion-content'
})
@NgView({
@View({
template: `
<div class="scroll-content">
<content></content>

View File

@@ -1,14 +1,13 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Icon} from 'ionic/components/icon/icon';
import {Checkbox} from 'ionic/components/checkbox/checkbox';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, Icon, Checkbox, List]
directives: [Content, Icon, Checkbox, List]
})
class IonicApp {
constructor() {

View File

@@ -1,5 +1,4 @@
import {Descendent, NgElement, Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Descendent, NgElement, Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Icon} from 'ionic/components/icon/icon';
import {Checkbox} from 'ionic/components/checkbox/checkbox';
@@ -7,9 +6,9 @@ import {List} from 'ionic/components/list/list';
import {Refresher} from 'ionic/components/scroll/pull-to-refresh';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, Icon, Checkbox, List, Refresher]
directives: [Content, Icon, Checkbox, List, Refresher]
})
class IonicApp {
constructor(

View File

@@ -1,45 +0,0 @@
export class Ion {}
// export class IonElement extends Ion {
// constructor() {
// this.children = [];
// }
// addChild(child) {
// }
// removeChild(child) {
// }
// insertChild(index, child) {
// }
// behaviors: Array<Behavior>;
// events: Array<String>;
// }
// class Behavior {
// }
// class IonButton extends IonElement {
// text: String;
// type: String;
// }
// class TabBar extends IonElement {
// tabbuttons: Array<IonTabButton>
// onClickTab() {
// let clickedTab = ev.target;
// }
// }
// class IonTabButton extends IonButton {
// }

View File

@@ -1,4 +1,4 @@
import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {NgElement, Component, View} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
import {
ItemPrimaryOptions, ItemSecondaryOptions
@@ -10,7 +10,7 @@ import {
@Component({
selector: 'ion-item,[ion-item]'
})
@NgView({
@View({
template: `
<content select="ion-primary-options"></content>
<content select="ion-primary-swipe-buttons"></content>

View File

@@ -1,14 +1,14 @@
import {Component, View as NgView, For, bootstrap} from 'angular2/angular2'
import {Item, View, List} from 'ionic/ionic'
import {Component, View, For, bootstrap} from 'angular2/angular2'
import {Item, List} from 'ionic/ionic'
import {ItemPrimarySwipeButtons} from 'ionic/components/item/item-swipe-buttons'
@Component({
selector: '[ion-app]'
})
@NgView({
@View({
templateUrl: 'main.html',
directives: [Item, View, List, For, ItemPrimarySwipeButtons]
directives: [Item, List, For, ItemPrimarySwipeButtons]
})
class App{
constructor() {

View File

@@ -1,14 +1,14 @@
import {Component, View as NgView, For, bootstrap} from 'angular2/angular2'
import {Item, View, List} from 'ionic/ionic'
import {Component, View, For, bootstrap} from 'angular2/angular2'
import {Item, List} from 'ionic/ionic'
import {ItemPrimarySwipeButtons} from 'ionic/components/item/item-swipe-buttons'
@Component({
selector: '[ion-app]'
})
@NgView({
@View({
templateUrl: 'main.html',
directives: [Item, View, List, For, ItemPrimarySwipeButtons]
directives: [Item, List, For, ItemPrimarySwipeButtons]
})
class App{
constructor() {

View File

@@ -1,10 +1,10 @@
import {NgElement, Component, View as NgView, Parent} from 'angular2/angular2'
import {NgElement, Component, View, Parent} from 'angular2/angular2'
@Component({
selector: 'layout,[layout]'
})
@NgView({
@View({
template: `
<content></content>
<object class="ele-qry" data="about:blank"></object>

View File

@@ -1,13 +1,12 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Layout} from 'ionic/components/layout/layout';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, Layout]
directives: [Content, Layout]
})
class IonicApp {
constructor() {

View File

@@ -1,11 +1,11 @@
import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {NgElement, Component, View} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@Component({
selector: 'ion-list'
})
@NgView({
@View({
template: `<content></content>`
})
export class List {

View File

@@ -1,13 +1,12 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, List]
directives: [Content, List]
})
class IonicApp {
constructor() {

View File

@@ -1,9 +1,9 @@
import {Compiler, NgElement, Component, View as NgView} from 'angular2/angular2';
import {Compiler, NgElement, Component, View} from 'angular2/angular2';
@Component({
selector: 'ion-modal-wrapper'
})
@NgView({
@View({
template: `
<div class="modal-backdrop active">
<div class="modal-backdrop-bg"></div>
@@ -25,7 +25,7 @@ class ModalWrapper {
@Component({
selector: 'ion-modal'
})
@NgView({
@View({
directives: [ModalWrapper],
template: `
<ion-modal-wrapper>

View File

@@ -1,6 +1,6 @@
import {
Decorator,
View as NgView,
View,
For,
NgElement,
Parent,

View File

@@ -7,7 +7,7 @@ import {
DynamicComponentLoader,
ElementRef,
Query,
View as NgView,
View,
} from 'angular2/angular2';
import {
@@ -59,7 +59,7 @@ export class NavController {
NavController
]
})
@NgView({
@View({
// See below for this.
template: '<div class="nav-item-child"></div>',
directives: [NavItemDynamicComponent]

View File

@@ -1,6 +1,6 @@
import {
Component,
View as NgView,
View,
If,
For,
NgElement,
@@ -32,7 +32,7 @@ export class NavInjectable {}
NavInjectable
]
})
@NgView({
@View({
template: `
<header class="toolbar-container" [class.hide]="getToolbars('top').length == 0">
<div *for="#toolbar of getToolbars('top')" [toolbar-create]="toolbar"></div>

View File

@@ -1,10 +1,10 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Nav} from 'ionic/components/nav/nav'
import {Log} from 'ionic/util'
import {FirstPage} from 'pages/first-page'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
directives: [Nav],
templateUrl: 'main.html'
})

View File

@@ -1,13 +1,13 @@
import {Component, View as NgView, Parent} from 'angular2/angular2'
import {Nav, View} from 'ionic/ionic'
import {Component, View, Parent} from 'angular2/angular2'
import {Nav} from 'ionic/ionic'
import {SecondPage} from 'pages/second-page'
@Component({
selector: 'first-page'
})
@NgView({
@View({
templateUrl: 'pages/first-page.html',
directives: [View]
directives: []
})
export class FirstPage {
constructor(

View File

@@ -1,13 +1,13 @@
import {Component, View as NgView, Parent} from 'angular2/angular2'
import {Component, View, Parent} from 'angular2/angular2'
import {Nav} from 'ionic/components'
import {View} from 'ionic/components/view/view'
@Component({
selector: 'second-page'
})
@NgView({
@View({
templateUrl: 'pages/second-page.html',
directives: [View]
directives: []
})
export class SecondPage {
constructor(

View File

@@ -1,11 +1,11 @@
import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {NgElement, Component, View} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@Component({
selector: 'ion-radio'
})
@NgView({
@View({
template: `
<div class="item-content">

View File

@@ -1,11 +1,11 @@
import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {NgElement, Component, View} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@Component({
selector: 'ion-radio-group'
})
@NgView({
@View({
template: `<content></content>`
})
export class RadioGroup {

View File

@@ -1,5 +1,4 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Icon} from 'ionic/components/icon/icon';
import {RadioGroup} from 'ionic/components/radio/radio-group';
@@ -7,9 +6,9 @@ import {RadioButton} from 'ionic/components/radio/radio-button';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, RadioGroup, RadioButton]
directives: [Content, RadioGroup, RadioButton]
})
class IonicApp {
constructor() {

View File

@@ -1,4 +1,4 @@
import {Component, View as NgView, Inject, Parent, NgElement} from 'angular2/angular2'
import {Component, View, Inject, Parent, NgElement} from 'angular2/angular2'
import {Log} from 'ionic/util'
/**

View File

@@ -1,4 +1,4 @@
import {NgElement, EventEmitter, Decorator, Component, View as NgView, PropertySetter} from 'angular2/angular2';
import {NgElement, EventEmitter, Decorator, Component, View, PropertySetter} from 'angular2/angular2';
@Decorator({
selector: '[ion-refresher]'

View File

@@ -1,4 +1,4 @@
import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {NgElement, Component, View} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@@ -9,7 +9,7 @@ import {IonicComponent} from 'ionic/config/component'
placeholderText: 'placeholder-text'
}
})
@NgView({
@View({
template: `<div class="search-bar-input-container">
<input class="search-bar-input" type="search" [attr.placeholder]="placeholderText">
</div>

View File

@@ -1,14 +1,13 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
import {SearchBar} from 'ionic/components/search-bar/search-bar';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, List, SearchBar]
directives: [Content, List, SearchBar]
})
class IonicApp {
constructor() {

View File

@@ -1,6 +1,5 @@
import {Component, Parent, Decorator, View as NgView, NgElement} from 'angular2/angular2'
import {Component, Parent, Decorator, View, NgElement} from 'angular2/angular2'
import {Nav} from 'ionic/components/nav/nav'
import {View} from 'ionic/components/view/view'
import {NavPane} from 'ionic/components/nav-pane/nav-pane'
import * as util from 'ionic/util'
@@ -29,7 +28,7 @@ class SplitViewportDecorator {
navTitle: 'navTitle'
},
})
@NgView({
@View({
template: `
<ion-view [nav-title]="navTitle" class="split-view">
<div class="pane-container">
@@ -57,7 +56,7 @@ ion-split-view > [split-viewport] {
</style>
`,
directives: [SplitViewportDecorator, Nav, View]
directives: [SplitViewportDecorator, Nav]
})
export class SplitView {
constructor(

View File

@@ -1,16 +1,16 @@
import {Component, View as NgView} from 'angular2/angular2'
import {View} from 'ionic/ionic'
import {Component, View} from 'angular2/angular2'
@Component({
selector: 'settings-general'
})
@NgView({
@View({
template: `
<ion-view nav-title="General Stuff">
General Settings
</ion-view>
`,
directives: [View]
directives: []
})
export class GeneralPage {
}

View File

@@ -1,8 +1,8 @@
import {Component, View as NgView} from 'angular2/angular2'
import {View, NavPane} from 'ionic/ionic'
import {Component, View} from 'angular2/angular2'
import {NavPane} from 'ionic/ionic'
@Component({ selector: 'privacy-settings' })
@NgView({
@View({
template: `
<ion-view nav-title="Privacy">
Privacy
@@ -10,7 +10,7 @@ import {View, NavPane} from 'ionic/ionic'
Next
</button>
</ion-view>`,
directives: [View]
directives: []
})
export class PrivacyPage {
constructor(navPane: NavPane) {
@@ -22,7 +22,7 @@ export class PrivacyPage {
}
@Component({ selector: 'privp1' })
@NgView({
@View({
template: `
<ion-view nav-title="Privacy Page 1">
This is page 1
@@ -36,7 +36,7 @@ This is page 1
</button>
</ion-view>
`,
directives: [View]
directives: []
})
class PrivacyP1 {
constructor(navPane: NavPane) {
@@ -51,7 +51,7 @@ class PrivacyP1 {
}
@Component({ selector: 'privp2' })
@NgView({
@View({
template: `
<ion-view nav-title="Privacy Page 2">
Page 2 here
@@ -62,7 +62,7 @@ Page 2 here
<br/>
</ion-view>
`,
directives: [View]
directives: []
})
class PrivacyP2 {
constructor(navPane: NavPane) {

View File

@@ -1,4 +1,4 @@
import {Component, View as NgView, NgElement} from 'angular2/angular2'
import {Component, View, NgElement} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@@ -11,7 +11,7 @@ import {IonicComponent} from 'ionic/config/component'
'click': 'onClick()'
}
})
@NgView({
@View({
template: `
<div class="item-content">

View File

@@ -1,13 +1,12 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Switch} from 'ionic/components/switch/switch';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Content, Switch, List]
directives: [Content, Switch, List]
})
class IonicApp {
constructor() {

View File

@@ -1,7 +1,7 @@
import {
Component,
NgElement,
View as NgView,
View,
Ancestor,
For,
If,
@@ -34,7 +34,7 @@ class TabNavInjectable {}
bind(NavInjectable).toClass(TabNavInjectable)
]
})
@NgView({
@View({
template: `
<header class="toolbar-container" [class.hide]="nav.getToolbars('top').length == 0">
<div *for="#toolbar of nav.getToolbars('top')" [toolbar-create]="toolbar">

View File

@@ -1,4 +1,4 @@
import {NgElement, Component, View as NgView, For, PropertySetter, Query} from 'angular2/angular2';
import {NgElement, Component, View, For, PropertySetter, Query} from 'angular2/angular2';
import {QueryList} from 'angular2/src/core/compiler/query_list';
import {IonicComponent} from 'ionic/config/component';
import {Toolbar} from 'ionic/components/toolbar/toolbar';
@@ -11,7 +11,7 @@ import {Tab} from 'ionic/components/tabs/tab';
tabBarIcons: 'tab-bar-icons'
}
})
@NgView({
@View({
//[attr.aria-activedescendant]="'tab-item-' + selectedTab.tabId"
template: `
<!-- TODO: Once the reprojected toolbar preserves the context of the Tabs, then

View File

@@ -1,4 +1,4 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Nav} from 'ionic/ionic'
import {SignInPage} from 'pages/sign-in'
@@ -6,7 +6,7 @@ import {SignInPage} from 'pages/sign-in'
@Component({
selector: '[ion-app]',
})
@NgView({
@View({
templateUrl: 'main.html',
directives: [Nav]
})

View File

@@ -1,6 +1,6 @@
import {
Component,
View as NgView,
View,
Ancestor,
} from 'angular2/angular2';
import {
@@ -13,7 +13,7 @@ import {
import {TabsPage} from 'pages/tabs';
@Component()
@NgView({
@View({
templateUrl: 'pages/sign-in.html',
directives: [Content, Toolbar, ToolbarTitle]
})

View File

@@ -1,10 +1,9 @@
import {
Component,
View as NgView,
View,
Parent,
} from 'angular2/angular2';
import {
View,
Tabs,
Tab,
Aside,
@@ -16,9 +15,9 @@ import {Toolbar, ToolbarTitle} from 'ionic/components/toolbar/toolbar';
@Component({
selector: 'tabs-page'
})
@NgView({
@View({
templateUrl: 'pages/tabs.html',
directives: [Tabs, Tab, View, Content]
directives: [Tabs, Tab, Content]
})
export class TabsPage {
@@ -35,7 +34,7 @@ export class TabsPage {
// tab 1
//
@Component({ selector: 't1p1' })
@NgView({
@View({
template: `
<header *ion-toolbar>
<h1 class="toolbar-title">Tabs 1 Page 1</h1>
@@ -60,7 +59,7 @@ class Tab1Page1 {
}
@Component({ selector: 't1p2' })
@NgView({
@View({
template: `
<header *ion-toolbar>
<h1 class="toolbar-title">Tabs 1 Page 2</h1>
@@ -87,7 +86,7 @@ class Tab1Page2 {
// tab 2
//
@Component({ selector: 't2p1' })
@NgView({
@View({
template: `
<ion-aside side="left" [content]="view">
Left aside for Tab 2 Page 1
@@ -101,7 +100,7 @@ class Tab1Page2 {
<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>
</ion-content>
`,
directives: [View, Aside, Content]
directives: [Aside, Content]
})
class Tab2Page1 {
// TODO change to 'Nav' injection when we're allowed to inject a tab as a nav.
@@ -114,7 +113,7 @@ class Tab2Page1 {
}
@Component({ selector: 't2p2' })
@NgView({
@View({
template: `
<ion-aside side="left" [content]="view">
Left aside for Tab 2 Page 2
@@ -134,7 +133,7 @@ class Tab2Page1 {
</ion-tab>
</ion-tabs>
`,
directives: [View, Aside, Tabs, Tab, Content]
directives: [Aside, Tabs, Tab, Content]
})
class Tab2Page2 {
// TODO change to 'Nav' injection when we're allowed to inject a tab as a nav.

View File

@@ -1,13 +1,13 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {View, Tabs, Tab} from 'ionic/ionic'
import {Component, View, bootstrap} from 'angular2/angular2'
import {Tabs, Tab} from 'ionic/ionic'
import {engine} from 'ionic/engine/engine'
import * as util from 'ionic/util'
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Tabs, Tab]
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {

View File

@@ -1,11 +1,11 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View, Tabs, Tab} from 'ionic/ionic';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Tabs, Tab} from 'ionic/ionic';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Tabs, Tab]
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {

View File

@@ -1,8 +1,8 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html'
})
class IonicApp {

View File

@@ -1,11 +1,11 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View, Tabs, Tab} from 'ionic/ionic';
import {Component, View, bootstrap} from 'angular2/angular2';
import {Tabs, Tab} from 'ionic/ionic';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View, Tabs, Tab]
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {

View File

@@ -1,10 +1,10 @@
import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {NgElement, Component, View} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@Component({
selector: '.back-button',
})
@NgView({
@View({
template: `
<icon [class-name]="'back-button-icon ' + icon"></icon>
<span class="back-button-text">

View File

@@ -1,10 +1,10 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View]
directives: []
})
class IonicApp {
constructor() {

View File

@@ -1,10 +1,10 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View]
directives: []
})
class IonicApp {
constructor() {

View File

@@ -1,10 +1,10 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
import {View} from 'ionic/components/view/view';
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@NgView({
@View({
templateUrl: 'main.html',
directives: [View]
directives: []
})
class IonicApp {
constructor() {

View File

@@ -3,7 +3,7 @@ import {
Component,
Decorator,
Viewport,
View as NgView,
View,
ViewContainer,
//ProtoViewRef,
onDestroy,
@@ -76,7 +76,7 @@ export class Toolbar {
// 'window:resize': 'align()',
// }
})
@NgView({
@View({
template: `
<div class="toolbar-inner-title toolbar-title-hide">
<content></content>
@@ -166,7 +166,7 @@ export class ToolbarContainer {
// title: 'nav-title'
// }
// })
// @NgView({
// @View({
// template: `
// <div class="toolbar-items">
// <button class="button back-button toolbar-item" style="display:none"></button>

View File

@@ -1,66 +0,0 @@
import {NgElement, Component, View as NgView, Parent, Ancestor} from 'angular2/angular2'
import {Toolbar} from 'ionic/components/toolbar/toolbar'
import {IonicComponent} from 'ionic/config/component'
@Component({
selector: 'ion-view',
properties: {
title: 'nav-title'
}
})
@NgView({
template: `
<ion-toolbar class="view-toolbar" [nav-title]="title">
<content select="ion-nav-title"></content>
<content select="ion-nav-items[side=primary]"></content>
<content select="ion-nav-items[side=secondary]"></content>
</ion-toolbar>
<content></content>`,
directives: [Toolbar]
})
export class View {
constructor(
@NgElement() ngElement:NgElement
) {
this.domElement = ngElement.domElement
this.config = View.config.invoke(this)
/*** TODO: MAKE MORE GOOD!! HACK HACK HACK!!!!!!!!! *****/
/*
Take the toolbar info from this view and view's context
and transplate it to go to it's associated toolbar container
Both ion-nav-view and ion-tabs components provide the toolbar container
Trick is that it's context needs to still be available after the DOM
element was moved to another location.
*/
setTimeout(() => {
var toolbar = this.domElement.querySelector('ion-toolbar')
if (!toolbar) return
toolbar.parentNode.removeChild(toolbar)
var ele = this.domElement.parentElement
var navViewportEle
while (ele) {
if (ele.tagName == 'ION-NAV-VIEWPORT' || ele.tagName == 'ION-TABS') {
navViewportEle = ele
break
}
ele = ele.parentElement
}
if (!navViewportEle) return
var toolbarContainer = navViewportEle.querySelector('.toolbar-container')
if (!toolbarContainer) return
toolbarContainer.appendChild(toolbar)
})
/*** HACK HACK HACK!!!!!!!!! *****/
}
}
new IonicComponent(View, {})