diff --git a/ionic/components/app/test/yerk/index.ts b/ionic/components/app/test/yerk/index.ts
index 78bc0fb532..43dc316439 100644
--- a/ionic/components/app/test/yerk/index.ts
+++ b/ionic/components/app/test/yerk/index.ts
@@ -1,10 +1,9 @@
import {Component} from 'angular2/angular2';
-import {IonicView, NavController} from 'ionic/ionic';
+import {App, IonicView, NavController} from 'ionic/ionic';
-@Component({ selector: 'ion-app' })
-@IonicView({
+@App({
templateUrl: 'main.html'
})
class IonicApp {
@@ -60,7 +59,3 @@ class TabsPage {
this.peekTab = PeekTabPage;
}
}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/app/test/yerk/main.html b/ionic/components/app/test/yerk/main.html
index 8d8bcfa3cd..90aca743e2 100644
--- a/ionic/components/app/test/yerk/main.html
+++ b/ionic/components/app/test/yerk/main.html
@@ -1,10 +1,10 @@
diff --git a/ionic/components/form/form.scss b/ionic/components/form/form.scss
index 0f228b9cde..be6af01faf 100644
--- a/ionic/components/form/form.scss
+++ b/ionic/components/form/form.scss
@@ -196,8 +196,8 @@ input[type="color"] {
line-height: $font-size-base + 2;
}
-.platform-ios,
-.platform-android {
+.mode-ios,
+.mode-android {
input[type="datetime-local"],
input[type="date"],
input[type="month"],
diff --git a/ionic/components/form/test/basic/index.ts b/ionic/components/form/test/basic/index.ts
index d8cd1e8ac2..2b056ad4e6 100644
--- a/ionic/components/form/test/basic/index.ts
+++ b/ionic/components/form/test/basic/index.ts
@@ -1,11 +1,9 @@
-import {Component, Directive, View} from 'angular2/angular2';
-
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
-//import {Switch, Form, List, Label, Item, Input, Content} from 'ionic/ionic';
+
+import {App} from 'ionic/ionic';
-@Component({ selector: 'ion-app' })
-@View({
+@App({
templateUrl: 'main.html'
})
class IonicApp {
@@ -23,7 +21,3 @@ class IonicApp {
alert('Deleting');
}
}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/ion.ts b/ionic/components/ion.ts
index 311e514e33..f2537a124e 100644
--- a/ionic/components/ion.ts
+++ b/ionic/components/ion.ts
@@ -1,4 +1,6 @@
import {IonicConfig} from '../config/config';
+import * as util from 'ionic/util';
+
/**
* Base class for all Ionic components. Exposes some common functionality
@@ -6,26 +8,82 @@ import {IonicConfig} from '../config/config';
* sending/receiving app-level events.
*/
export class Ion {
- constructor(elementRef: ElementRef) {
+ constructor(elementRef: ElementRef, ionicConfig: IonicConfig) {
this.elementRef = elementRef;
+ this.ionicConfig = ionicConfig;
+ this.clsMode = this.ionicConfig.setting('mode');
+ }
+
+ onInit() {
+ let cls = this.constructor;
+
+ if (cls.defaultProperties && this.ionicConfig) {
+ for (let prop in cls.defaultProperties) {
+ // Priority:
+ // ---------
+ // 1) Value set from within constructor
+ // 2) Value set from the host element's attribute
+ // 3) Value set by the users global config
+ // 4) Value set by the default mode/platform config
+ // 5) Value set from the component's default
+
+ if (this[prop]) {
+ // this property has already been set on the instance
+ // could be from the user setting the element's attribute
+ // or from the user setting it within the constructor
+ continue;
+ }
+
+ // get the property values from a global user/platform config
+ let configVal = this.ionicConfig.setting(prop);
+ if (configVal) {
+ this[prop] = configVal;
+ continue;
+ }
+
+ // wasn't set yet, so go with property's default value
+ this[prop] = cls.defaultProperties[prop];
+ }
+ }
+
+ this.onIonInit && this.onIonInit();
+ }
+
+ getDelegate(delegateName) {
+ let cls = this.constructor;
+
+ if (cls.delegates) {
+ let cases = cls.delegates[delegateName] || [];
+
+ for (let i = 0; i < cases.length; i++) {
+ let delegateCase = cases[i];
+ if (util.isArray(delegateCase)) {
+ let [ check, DelegateConstructor ] = delegateCase;
+ if (check(this)) {
+ return new DelegateConstructor(this);
+ }
+
+ } else {
+ return new delegateCase(this);
+ }
+ }
+ }
+ }
+
+ getElementRef() {
+ return this.elementRef;
}
getNativeElement() {
return this.elementRef.nativeElement;
}
- get cssClass() {
- // IonicConfig.global
-
- // should be able to set map of classes to add soon:
- // https://github.com/angular/angular/issues/2364
-
- let componentId = this.constructor.name;
-
- // let classes = {};
- // classes[componentId + '-ios'] = true;
- // return classes;
-
- return true;
+ width() {
+ return this.getNativeElement().offsetWidth;
}
+
+ height() {
+ return this.getNativeElement().offsetHeight;
+ }
+
}
diff --git a/ionic/components/item/extensions/ios.scss b/ionic/components/item/extensions/ios.scss
index 618e12c95e..2ada4bb04c 100644
--- a/ionic/components/item/extensions/ios.scss
+++ b/ionic/components/item/extensions/ios.scss
@@ -9,49 +9,50 @@ $item-ios-accessory-color: #8e8e93 !default;
$item-ios-border-color: $list-ios-border-color !default;
-.list-ios {
+.list[mode="ios"] {
margin-top: -1px;
-}
-.list-ios .item {
- background: $item-ios-background-color;
- min-height: $item-ios-min-height;
- padding-left: $item-ios-padding-left;
+ .item {
+ background: $item-ios-background-color;
+ min-height: $item-ios-min-height;
+ padding-left: $item-ios-padding-left;
- .item-media + .item-content {
- margin-left: $item-ios-padding-left;
+ .item-media + .item-content {
+ margin-left: $item-ios-padding-left;
+ }
+
+ .item-content {
+ min-height: $item-ios-min-height;
+ padding: 0;
+ @include hairline(bottom, $item-ios-border-color, $z-index-list-border);
+ }
+
+ .item:last-of-type .item-content:after {
+ background: none;
+ }
+
+ .item-accessory {
+ color: $item-ios-accessory-color;
+ }
+
+ .item-subtitle {
+ width: 100%;
+ color: #808080;
+ }
+ .item-full {
+ // No left ios-style padding
+ padding-left: 0;
+
+ button {
+ width: 100%;
+ font-size: 1.3em;
+ }
+ }
}
- .item-content {
- min-height: $item-ios-min-height;
- padding: 0;
+ .item-group-title {
+ // TODO: This doesn't look great when it's a header for the first item
@include hairline(bottom, $item-ios-border-color, $z-index-list-border);
}
- .item:last-of-type .item-content:after {
- background: none;
- }
-
- .item-accessory {
- color: $item-ios-accessory-color;
- }
-
- .item-subtitle {
- width: 100%;
- color: #808080;
- }
- .item-full {
- // No left ios-style padding
- padding-left: 0;
-
- button {
- width: 100%;
- font-size: 1.3em;
- }
- }
-}
-
-.list-ios .item-group-title {
- // TODO: This doesn't look great when it's a header for the first item
- @include hairline(bottom, $item-ios-border-color, $z-index-list-border);
}
diff --git a/ionic/components/item/item-group.ts b/ionic/components/item/item-group.ts
index adec8d4fe6..7b835ee0d6 100644
--- a/ionic/components/item/item-group.ts
+++ b/ionic/components/item/item-group.ts
@@ -1,19 +1,19 @@
-import {Component, Directive, View, ElementRef} from 'angular2/angular2';
+import {Directive, ElementRef} from 'angular2/angular2';
-@Component({
+
+@Directive({
selector: 'ion-item-group',
host: {
'class': 'item-group'
}
})
-@View({
- template: ``
-})
export class ItemGroup {
constructor(elementRef: ElementRef) {
this.ele = elementRef.nativeElement;
}
}
+
+
@Directive({
selector: 'ion-item-group-title',
host: {
diff --git a/ionic/components/item/test/accessories/index.ts b/ionic/components/item/test/accessories/index.ts
index 669edce61b..0a28867b95 100644
--- a/ionic/components/item/test/accessories/index.ts
+++ b/ionic/components/item/test/accessories/index.ts
@@ -1,12 +1,7 @@
-import {Component} from 'angular2/angular2';
-
-import {IonicView} from 'ionic/ionic';
+import {App} from 'ionic/ionic';
-@Component({
- selector: 'ion-app'
-})
-@IonicView({
+@App({
templateUrl: 'main.html'
})
class IonicApp {
@@ -14,7 +9,3 @@ class IonicApp {
this.items = [1, 2, 3, 4, 5]
}
}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/item/test/basic/index.ts b/ionic/components/item/test/basic/index.ts
deleted file mode 100644
index 669edce61b..0000000000
--- a/ionic/components/item/test/basic/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import {Component} from 'angular2/angular2';
-
-import {IonicView} from 'ionic/ionic';
-
-
-@Component({
- selector: 'ion-app'
-})
-@IonicView({
- templateUrl: 'main.html'
-})
-class IonicApp {
- constructor() {
- this.items = [1, 2, 3, 4, 5]
- }
-}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/layout/test/basic/index.ts b/ionic/components/layout/test/basic/index.ts
index ef9ff54ffc..2dac2b7a35 100644
--- a/ionic/components/layout/test/basic/index.ts
+++ b/ionic/components/layout/test/basic/index.ts
@@ -1,15 +1,7 @@
-import {Component, View} from 'angular2/angular2';
-
-import {IonicView} from 'ionic/ionic';
+import {App} from 'ionic/ionic';
-@Component({ selector: 'ion-app' })
-@IonicView({
+@App({
templateUrl: 'main.html'
})
class IonicApp {}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
-
diff --git a/ionic/components/list/extensions/ios.scss b/ionic/components/list/extensions/ios.scss
index 17d356ac69..86a6304a43 100644
--- a/ionic/components/list/extensions/ios.scss
+++ b/ionic/components/list/extensions/ios.scss
@@ -14,7 +14,7 @@ $list-ios-footer-font-size: 1.4rem !default;
$list-ios-footer-color: #8f8f94 !default;
-.list.list-ios {
+.list.list[mode="ios"] {
// Add the hairline to the top of the first item
.item:first-of-type {
@include hairline(top, $list-ios-border-color, $z-index-list-border);
diff --git a/ionic/components/list/list.ts b/ionic/components/list/list.ts
index d5fb4eab06..d390255292 100644
--- a/ionic/components/list/list.ts
+++ b/ionic/components/list/list.ts
@@ -1,6 +1,7 @@
-import {ElementRef, onInit} from 'angular2/angular2';
+import {ElementRef} from 'angular2/angular2';
import {Ion} from '../ion';
+import {IonicConfig} from '../../config/config';
import {IonicDirective} from '../../config/annotations';
import {ListVirtualScroll} from './virtual';
import * as util from 'ionic/util';
@@ -15,13 +16,12 @@ import * as util from 'ionic/util';
]
})
export class List extends Ion {
- constructor(elementRef: ElementRef) {
- super(elementRef);
+ constructor(elementRef: ElementRef, ionicConfig: IonicConfig) {
+ super(elementRef, ionicConfig);
this.ele = elementRef.nativeElement;
}
- onInit() {
- List.applyConfig(this);
+ onIonInit() {
if (util.isDefined(this.virtual)) {
console.log('Content', this.content);
console.log('Virtual?', this.virtual);
diff --git a/ionic/components/list/test/basic/index.ts b/ionic/components/list/test/basic/index.ts
index 8ae1df8e63..2dac2b7a35 100644
--- a/ionic/components/list/test/basic/index.ts
+++ b/ionic/components/list/test/basic/index.ts
@@ -1,14 +1,7 @@
-import {Component} from 'angular2/angular2';
-
-import {IonicView} from 'ionic/ionic';
+import {App} from 'ionic/ionic';
-@Component({ selector: 'ion-app' })
-@IonicView({
+@App({
templateUrl: 'main.html'
})
class IonicApp {}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/list/test/infinite/index.ts b/ionic/components/list/test/infinite/index.ts
index 3d7100d3ba..13c46d8f7c 100644
--- a/ionic/components/list/test/infinite/index.ts
+++ b/ionic/components/list/test/infinite/index.ts
@@ -1,7 +1,25 @@
-import {NgFor, ProtoViewRef, ViewContainerRef} from 'angular2/angular2'
-import {Component, Directive, View, Parent} from 'angular2/angular2';
+import {ProtoViewRef, ViewContainerRef} from 'angular2/angular2'
+import {Directive, Parent, forwardRef} from 'angular2/angular2';
-import {Content, List, Item} from 'ionic/ionic';
+import {App, List} from 'ionic/ionic';
+
+
+
+@App({
+ templateUrl: 'main.html',
+ directives: [forwardRef(() => ItemCellTemplate)]
+})
+class IonicApp {
+ constructor() {
+
+ this.items = []
+ for(let i = 0; i < 1000; i++) {
+ this.items.push({
+ title: 'Item ' + i
+ })
+ }
+ }
+}
/*
@@ -22,26 +40,3 @@ export class ItemCellTemplate {
list.setItemTemplate(this);
}
}
-
-
-@Component({ selector: 'ion-app' })
-@View({
- templateUrl: 'main.html',
- directives: [Content, List, Item, ItemCellTemplate, NgFor]
-})
-class IonicApp {
- constructor() {
- console.log('IonicApp Start')
-
- this.items = []
- for(let i = 0; i < 1000; i++) {
- this.items.push({
- title: 'Item ' + i
- })
- }
- }
-}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/list/test/sticky/index.ts b/ionic/components/list/test/sticky/index.ts
index d5016075f8..52e196e1b6 100644
--- a/ionic/components/list/test/sticky/index.ts
+++ b/ionic/components/list/test/sticky/index.ts
@@ -1,17 +1,11 @@
-import {NgFor, ProtoViewRef, ViewContainerRef} from 'angular2/angular2'
-import {Component, Directive, View, Parent} from 'angular2/angular2';
+import {App} from 'ionic/ionic';
-import {Content, List, Item, ItemGroup, ItemGroupTitle} from 'ionic/ionic';
-@Component({ selector: 'ion-app' })
-@View({
- templateUrl: 'main.html',
- directives: [Content, List, Item, ItemGroup, ItemGroupTitle, NgFor]
+@App({
+ templateUrl: 'main.html'
})
class IonicApp {
constructor() {
- console.log('IonicApp Start')
-
this.groups = [];
var letters = "abcdefghijklmnopqrstuvwxyz".split('');
@@ -30,7 +24,3 @@ class IonicApp {
}
}
}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/list/virtual.ts b/ionic/components/list/virtual.ts
index 0bc3ca62de..6e8f2e1a1b 100644
--- a/ionic/components/list/virtual.ts
+++ b/ionic/components/list/virtual.ts
@@ -5,7 +5,7 @@ export class ListVirtualScroll {
this.list = list;
this.content = this.list.content;
- this.viewportHeight = this.content.ele.offsetHeight;
+ this.viewportHeight = this.content.height();
this.viewContainer = this.list.itemTemplate.viewContainer;
@@ -31,7 +31,7 @@ export class ListVirtualScroll {
}
resize() {
- this.viewportHeight = this.content.ele.offsetHeight;
+ this.viewportHeight = this.content.height();
this.viewportScrollHeight = this.content.scrollElement.scrollHeight;
this.virtualHeight = this.list.items.length * this.itemHeight;
@@ -100,7 +100,7 @@ export class ListVirtualScroll {
}
console.log('VIRTUAL SCROLL: scroll(scrollTop:', st, 'topIndex:', topIndex, 'bottomIndex:', bottomIndex, ')');
- console.log('Container has', this.list.ele.children.length, 'children');
+ console.log('Container has', this.list.getNativeElement().children.length, 'children');
}
cellAtIndex(index) {
diff --git a/ionic/components/modal/modal.scss b/ionic/components/modal/modal.scss
index b791650d88..3738882a88 100644
--- a/ionic/components/modal/modal.scss
+++ b/ionic/components/modal/modal.scss
@@ -28,60 +28,3 @@ ion-modal {
transform: translate3d(0px, 0px, 0px);
}
}
-
-
-
-/*@media (min-width: $modal-inset-mode-break-point) {
- // inset mode is when the modal doesn't fill the entire
- // display but instead is centered within a large display
- .modal {
- top: $modal-inset-mode-top;
- right: $modal-inset-mode-right;
- bottom: $modal-inset-mode-bottom;
- left: $modal-inset-mode-left;
- overflow: visible;
- min-height: $modal-inset-mode-min-height;
- width: (100% - $modal-inset-mode-left - $modal-inset-mode-right);
- }
-
- .modal.ng-leave-active {
- bottom: 0;
- }
-
- // remove ios header padding from inset header
- .platform-ios.platform-cordova .modal-wrapper .modal {
- .bar-header:not(.bar-subheader) {
- height: $bar-height;
- > * {
- margin-top: 0;
- }
- }
- .tabs-top > .tabs,
- .tabs.tabs-top {
- top: $bar-height;
- }
- .has-header,
- .bar-subheader {
- top: $bar-height;
- }
- .has-subheader {
- top: $bar-height + $bar-subheader-height;
- }
- .has-tabs-top {
- top: $bar-height + $tabs-height;
- }
- .has-header.has-subheader.has-tabs-top {
- top: $bar-height + $bar-subheader-height + $tabs-height;
- }
- }
-
- .modal-backdrop-bg {
- transition: opacity 300ms ease-in-out;
- background-color: $modal-backdrop-bg-active;
- opacity: 0;
- }
-
- .active .modal-backdrop-bg {
- opacity: 0.5;
- }
-}*/
diff --git a/ionic/components/modal/modal.ts b/ionic/components/modal/modal.ts
index 7ea45bfcfc..d8d987a1ff 100644
--- a/ionic/components/modal/modal.ts
+++ b/ionic/components/modal/modal.ts
@@ -2,15 +2,11 @@ import {Injectable} from 'angular2/angular2';
import {Overlay} from '../overlay/overlay';
import {Animation} from '../../animations/animation';
-import {IonicApp} from '../app/app';
import * as util from 'ionic/util';
@Injectable()
export class Modal extends Overlay {
- constructor(app: IonicApp) {
- super(app);
- }
open(ComponentType: Type, opts={}) {
let defaults = {
diff --git a/ionic/components/modal/test/basic/index.ts b/ionic/components/modal/test/basic/index.ts
index c6e8197b27..214d51b796 100644
--- a/ionic/components/modal/test/basic/index.ts
+++ b/ionic/components/modal/test/basic/index.ts
@@ -1,19 +1,37 @@
import {Component} from 'angular2/angular2';
-import {IonicComponent, IonicView, IonicConfig, Platform} from 'ionic/ionic';
+import {App, IonicComponent, IonicView, IonicApp, IonicConfig, Platform} from 'ionic/ionic';
import {Modal, NavController, NavParams, Animation, ActionMenu} from 'ionic/ionic';
-@Component({
- selector: 'ion-app'
-})
-@IonicView({
+@App({
templateUrl: 'main.html'
})
class MyAppCmp {
- constructor(modal: Modal) {
+ constructor(modal: Modal, app: IonicApp, ionicConfig: IonicConfig) {
this.modal = modal;
+
+ console.log('platforms', Platform.platforms());
+ console.log('mode', ionicConfig.setting('mode'));
+
+ console.log('core', Platform.is('core'))
+ console.log('cordova', Platform.is('cordova'))
+ console.log('mobile', Platform.is('mobile'))
+ console.log('ipad', Platform.is('ipad'))
+ console.log('iphone', Platform.is('iphone'))
+ console.log('phablet', Platform.is('phablet'))
+ console.log('tablet', Platform.is('tablet'))
+ console.log('ios', Platform.is('ios'))
+ console.log('android', Platform.is('android'))
+ console.log('windows phone', Platform.is('windowsphone'))
+
+ console.log('isRTL', app.isRTL())
+
+ Platform.ready().then(() => {
+ console.log('Platform.ready')
+ });
+
}
openModal() {
@@ -135,40 +153,6 @@ export class ModalSecondPage {
}
-export function main(ionicBootstrap) {
-
- let myConfig = new IonicConfig();
-
- // myConfig.setting('someKey', 'userConfig');
- // myConfig.setting('ios', 'someKey', 'iosConfig');
- // myConfig.setting('ipad', 'someKey', 'ipadConfig');
-
- ionicBootstrap(MyAppCmp, myConfig).then(app => {
-
- console.log('platforms', Platform.platforms());
- console.log('mode', myConfig.setting('mode'));
-
- console.log('core', Platform.is('core'))
- console.log('cordova', Platform.is('cordova'))
- console.log('mobile', Platform.is('mobile'))
- console.log('ipad', Platform.is('ipad'))
- console.log('iphone', Platform.is('iphone'))
- console.log('phablet', Platform.is('phablet'))
- console.log('tablet', Platform.is('tablet'))
- console.log('ios', Platform.is('ios'))
- console.log('android', Platform.is('android'))
- console.log('windows phone', Platform.is('windowsphone'))
-
- console.log('isRTL', app.isRTL())
- console.log('lang', app.lang())
-
- Platform.ready().then(() => {
- console.log('Platform.ready')
- });
-
- });
-}
-
class FadeIn extends Animation {
constructor(element) {
diff --git a/ionic/components/nav-bar/extensions/ios.scss b/ionic/components/nav-bar/extensions/ios.scss
index 537b138e3f..1afd86eeba 100644
--- a/ionic/components/nav-bar/extensions/ios.scss
+++ b/ionic/components/nav-bar/extensions/ios.scss
@@ -19,7 +19,7 @@ $navbar-ios-button-text-color: #007aff !default;
$navbar-ios-button-background-color: transparent !default;
-.nav-ios .navbar-container {
+.nav[mode="ios"] .navbar-container {
min-height: $navbar-ios-height;
background: $navbar-ios-background;
diff --git a/ionic/components/nav-bar/extensions/material.scss b/ionic/components/nav-bar/extensions/material.scss
index 3986ed42e2..6d6d3dcc6b 100644
--- a/ionic/components/nav-bar/extensions/material.scss
+++ b/ionic/components/nav-bar/extensions/material.scss
@@ -10,7 +10,7 @@ $navbar-material-button-font-size: 2rem !default;
$navbar-material-button-text-color: #007aff !default;
-.navbar-md {
+.navbar[mode="md"] {
height: $navbar-material-height;
background: $navbar-material-background;
diff --git a/ionic/components/nav-bar/nav-bar.scss b/ionic/components/nav-bar/nav-bar.scss
index 3eb9f41539..32d0c7830c 100644
--- a/ionic/components/nav-bar/nav-bar.scss
+++ b/ionic/components/nav-bar/nav-bar.scss
@@ -3,7 +3,7 @@
// --------------------------------------------------
-ion-navbar {
+.navbar {
position: absolute;
width: 100%;
height: 100%;
diff --git a/ionic/components/nav-bar/nav-bar.ts b/ionic/components/nav-bar/nav-bar.ts
index 4ff4e1cb2d..39e280f225 100644
--- a/ionic/components/nav-bar/nav-bar.ts
+++ b/ionic/components/nav-bar/nav-bar.ts
@@ -1,7 +1,8 @@
-import {Component, Directive, View, Parent, ElementRef, forwardRef} from 'angular2/angular2';
+import {Directive, View, Parent, ElementRef, forwardRef} from 'angular2/angular2';
import {ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
import {Ion} from '../ion';
+import {IonicConfig} from '../../config/config';
import {IonicComponent} from '../../config/annotations';
import {ViewItem} from '../view/view-item';
import * as dom from '../../util/dom';
@@ -41,8 +42,9 @@ import * as dom from '../../util/dom';
]
})
export class Navbar extends Ion {
- constructor(item: ViewItem, elementRef: ElementRef) {
- super(elementRef);
+ constructor(item: ViewItem, elementRef: ElementRef, ionicConfig: IonicConfig) {
+ super(elementRef, ionicConfig);
+
this.eleRef = elementRef;
this.itemEles = [];
item.navbarView(this);
@@ -51,10 +53,6 @@ export class Navbar extends Ion {
this.bbText = '';
}
- onInit() {
- Navbar.applyConfig(this);
- }
-
element() {
return this.eleRef;
}
diff --git a/ionic/components/nav-bar/test/html-title/e2e.ts b/ionic/components/nav-bar/test/html-title/e2e.ts
deleted file mode 100644
index 8b13789179..0000000000
--- a/ionic/components/nav-bar/test/html-title/e2e.ts
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/ionic/components/nav-bar/test/html-title/index.ts b/ionic/components/nav-bar/test/html-title/index.ts
deleted file mode 100644
index c062390041..0000000000
--- a/ionic/components/nav-bar/test/html-title/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import {Component, Directive} from 'angular2/angular2';
-
-import {IonicView} from 'ionic/ionic';
-
-
-@Component({ selector: 'ion-app' })
-@IonicView({
- templateUrl: 'main.html'
-})
-class IonicApp {}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/nav-bar/test/html-title/main.html b/ionic/components/nav-bar/test/html-title/main.html
deleted file mode 100644
index 87f9edbec9..0000000000
--- a/ionic/components/nav-bar/test/html-title/main.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- Awesome
- HTML
- Title
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ionic/components/nav-bar/test/long-title/e2e.ts b/ionic/components/nav-bar/test/long-title/e2e.ts
deleted file mode 100644
index 8b13789179..0000000000
--- a/ionic/components/nav-bar/test/long-title/e2e.ts
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/ionic/components/nav-bar/test/long-title/main.html b/ionic/components/nav-bar/test/long-title/main.html
deleted file mode 100644
index 8aa9b7c4bc..0000000000
--- a/ionic/components/nav-bar/test/long-title/main.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ionic/components/nav-bar/test/lopsided-buttons/e2e.ts b/ionic/components/nav-bar/test/lopsided-buttons/e2e.ts
deleted file mode 100644
index 8b13789179..0000000000
--- a/ionic/components/nav-bar/test/lopsided-buttons/e2e.ts
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/ionic/components/nav-bar/test/lopsided-buttons/index.ts b/ionic/components/nav-bar/test/lopsided-buttons/index.ts
deleted file mode 100644
index c062390041..0000000000
--- a/ionic/components/nav-bar/test/lopsided-buttons/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import {Component, Directive} from 'angular2/angular2';
-
-import {IonicView} from 'ionic/ionic';
-
-
-@Component({ selector: 'ion-app' })
-@IonicView({
- templateUrl: 'main.html'
-})
-class IonicApp {}
-
-export function main(ionicBootstrap) {
- ionicBootstrap(IonicApp);
-}
diff --git a/ionic/components/nav-bar/test/lopsided-buttons/main.html b/ionic/components/nav-bar/test/lopsided-buttons/main.html
deleted file mode 100644
index 4eb7e73c5f..0000000000
--- a/ionic/components/nav-bar/test/lopsided-buttons/main.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A long time ago, in a galaxy far,
- far away....
-
-
- It is a period of civil war.
- Rebel spaceships, striking
- from a hidden base, have won
- their first victory against
- the evil Galactic Empire.
-
-
- During the battle, rebel
- spies managed to steal secret
- plans to the Empire's
- ultimate weapon, the DEATH
- STAR, an armored space
- station with enough power to
- destroy an entire planet.
-
-
- Pursued by the Empire's
- sinister agents, Princess
- Leia races home aboard her
- starship, custodian of the
- stolen plans that can save
- her people and restore
- freedom to the galaxy....
-