+
Close
Modal
diff --git a/ionic/components/alert/alert.ios.scss b/ionic/components/alert/alert.ios.scss
index 09c74cd96b..d6c405a710 100644
--- a/ionic/components/alert/alert.ios.scss
+++ b/ionic/components/alert/alert.ios.scss
@@ -5,12 +5,12 @@
// --------------------------------------------------
$alert-ios-max-width: 270px !default;
-$alert-ios-background: rgba(0,0,0,0) !default;
$alert-ios-border-radius: 13px !default;
-$alert-ios-background-color: #f8f8f8 !default;
+$alert-ios-background: #f8f8f8 !default;
+$alert-ios-box-shadow: none !default;
-$alert-ios-head-padding: 12px 16px 7px !default;
$alert-ios-head-text-align: center !default;
+$alert-ios-head-padding: 12px 16px 7px !default;
$alert-ios-title-margin-top: 8px !default;
$alert-ios-title-font-weight: 600 !default;
@@ -22,6 +22,9 @@ $alert-ios-message-padding: 0px 16px 21px !default;
$alert-ios-message-text-color: inherit !default;
$alert-ios-message-text-align: center !default;
$alert-ios-message-font-size: 13px !default;
+$alert-ios-message-padding-empty: 0 0 12px 0 !default;
+
+$alert-ios-content-max-height: 240px !default;
$alert-ios-input-padding: 6px !default;
$alert-ios-input-margin-top: 10px !default;
@@ -29,35 +32,46 @@ $alert-ios-input-background-color: #fff !default;
$alert-ios-input-border: 1px solid #ccc !default;
$alert-ios-input-border-radius: 4px !default;
+$alert-ios-button-group-flex-wrap: wrap !default;
+
+$alert-ios-button-margin: 0 !default;
+$alert-ios-button-flex: 1 1 auto !default;
$alert-ios-button-min-height: 44px !default;
+$alert-ios-button-min-width: 50% !default;
$alert-ios-button-font-size: 17px !default;
$alert-ios-button-text-color: map-get($colors-ios, primary) !default;
$alert-ios-button-background-color: transparent !default;
+$alert-ios-button-background-color-activated: #e9e9e9 !default;
+
$alert-ios-button-border-radius: 0 !default;
+$alert-ios-button-border-width: 1px !default;
+$alert-ios-button-border-style: solid !default;
$alert-ios-button-border-color: #dbdbdf !default;
-$alert-ios-button-activated-background-color: #e9e9e9 !default;
-$alert-checkbox-ios-icon-size: 21px !default;
-$alert-checkbox-ios-icon-border-radius: 50% !default;
-$alert-checkbox-ios-icon-border-width: 1px !default;
-$alert-checkbox-ios-icon-border-style: solid !default;
-$alert-checkbox-ios-icon-border-color-off: $list-ios-border-color !default;
-$alert-checkbox-ios-icon-border-color-on: map-get($colors-ios, primary) !default;
-$alert-checkbox-ios-background-color-off: $list-ios-background-color !default;
-$alert-checkbox-ios-background-color-on: map-get($colors-ios, primary) !default;
-$alert-checkbox-ios-icon-checkmark-width: $alert-checkbox-ios-icon-border-width !default;
-$alert-checkbox-ios-icon-checkmark-style: $alert-checkbox-ios-icon-border-style !default;
-$alert-checkbox-ios-icon-checkmark-color: $background-ios-color !default;
+$alert-ios-button-main-font-weight: bold !default;
+$alert-ios-radio-label-padding: 13px !default;
+$alert-ios-radio-icon-min-width: 30px !default;
+
+$alert-ios-checkbox-icon-size: 21px !default;
+$alert-ios-checkbox-icon-border-radius: 50% !default;
+$alert-ios-checkbox-icon-border-width: 1px !default;
+$alert-ios-checkbox-icon-border-style: solid !default;
+$alert-ios-checkbox-icon-border-color-off: $list-ios-border-color !default;
+$alert-ios-checkbox-icon-border-color-on: map-get($colors-ios, primary) !default;
+$alert-ios-checkbox-background-color-off: $list-ios-background-color !default;
+$alert-ios-checkbox-background-color-on: map-get($colors-ios, primary) !default;
+$alert-ios-checkbox-icon-checkmark-width: $alert-ios-checkbox-icon-border-width !default;
+$alert-ios-checkbox-icon-checkmark-style: $alert-ios-checkbox-icon-border-style !default;
+$alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default;
-ion-alert {
- background: $alert-ios-background;
-}
.alert-wrapper {
- border-radius: $alert-ios-border-radius;
- background-color: $alert-ios-background-color;
max-width: $alert-ios-max-width;
+ border-radius: $alert-ios-border-radius;
+ background-color: $alert-ios-background;
+
+ box-shadow: $alert-ios-box-shadow;
overflow: hidden;
}
@@ -66,8 +80,8 @@ ion-alert {
// --------------------------------------------------
.alert-head {
- padding: $alert-ios-head-padding;
text-align: $alert-ios-head-text-align;
+ padding: $alert-ios-head-padding;
}
.alert-title {
@@ -94,10 +108,10 @@ ion-alert {
}
.alert-message {
- max-height: 240px;
+ max-height: $alert-ios-content-max-height;
&:empty {
- padding: 0 0 12px 0;
+ padding: $alert-ios-message-padding-empty;
}
}
@@ -120,8 +134,8 @@ ion-alert {
.alert-radio-group,
.alert-checkbox-group {
- max-height: 240px;
- border-top: 1px solid $alert-ios-button-border-color;
+ max-height: $alert-ios-content-max-height;
+ border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
overflow: scroll;
}
@@ -138,8 +152,7 @@ ion-alert {
.alert-radio-label {
flex: 1;
order: 0;
- padding: 13px;
- text-align: auto;
+ padding: $alert-ios-radio-label-padding;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@@ -148,7 +161,7 @@ ion-alert {
.alert-radio-icon {
position: relative;
order: 1;
- min-width: 30px;
+ min-width: $alert-ios-radio-icon-min-width;
}
.alert-radio[aria-checked=true] {
@@ -187,24 +200,24 @@ ion-alert {
.alert-checkbox-icon {
margin: 10px 6px 10px 16px;
position: relative;
- width: $alert-checkbox-ios-icon-size;
- height: $alert-checkbox-ios-icon-size;
- border-radius: $alert-checkbox-ios-icon-border-radius;
- border-width: $alert-checkbox-ios-icon-border-width;
- border-style: $alert-checkbox-ios-icon-border-style;
- border-color: $alert-checkbox-ios-icon-border-color-off;
- background-color: $alert-checkbox-ios-background-color-off;
+ width: $alert-ios-checkbox-icon-size;
+ height: $alert-ios-checkbox-icon-size;
+ border-radius: $alert-ios-checkbox-icon-border-radius;
+ border-width: $alert-ios-checkbox-icon-border-width;
+ border-style: $alert-ios-checkbox-icon-border-style;
+ border-color: $alert-ios-checkbox-icon-border-color-off;
+ background-color: $alert-ios-checkbox-background-color-off;
}
.alert-checkbox[aria-checked=true] .alert-checkbox-icon {
- background-color: $alert-checkbox-ios-background-color-on;
- border-color: $alert-checkbox-ios-icon-border-color-on;
+ background-color: $alert-ios-checkbox-background-color-on;
+ border-color: $alert-ios-checkbox-icon-border-color-on;
.alert-checkbox-inner {
position: absolute;
- border-width: $alert-checkbox-ios-icon-checkmark-width;
- border-style: $alert-checkbox-ios-icon-checkmark-style;
- border-color: $alert-checkbox-ios-icon-checkmark-color;
+ border-width: $alert-ios-checkbox-icon-checkmark-width;
+ border-style: $alert-ios-checkbox-icon-checkmark-style;
+ border-color: $alert-ios-checkbox-icon-checkmark-color;
top: 4px;
left: 7px;
width: 4px;
@@ -220,34 +233,30 @@ ion-alert {
// --------------------------------------------------
.alert-button-group {
- flex-wrap: wrap;
- margin-right: -1px;
+ flex-wrap: $alert-ios-button-group-flex-wrap;
+ margin-right: -$alert-ios-button-border-width;
}
.alert-button {
- margin: 0;
- flex: 1 1 auto;
- min-width: 50%;
+ margin: $alert-ios-button-margin;
+ flex: $alert-ios-button-flex;
+ min-width: $alert-ios-button-min-width;
font-size: $alert-ios-button-font-size;
height: $alert-ios-button-min-height;
border-radius: $alert-ios-button-border-radius;
- border-top: 1px solid $alert-ios-button-border-color;
- border-right: 1px solid $alert-ios-button-border-color;
+ border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
+ border-right: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
color: $alert-ios-button-text-color;
background-color: $alert-ios-button-background-color;
+ overflow: hidden;
&:last-child {
- font-weight: bold;
+ font-weight: $alert-ios-button-main-font-weight;
border-right: 0;
}
&.activated {
- opacity: 1;
- background-color: $alert-ios-button-activated-background-color;
- }
-
- &:hover:not(.disable-hover) {
- opacity: 1;
+ background-color: $alert-ios-button-background-color-activated;
}
}
diff --git a/ionic/components/alert/alert.md.scss b/ionic/components/alert/alert.md.scss
index 4f00a8c341..11a5f907bd 100644
--- a/ionic/components/alert/alert.md.scss
+++ b/ionic/components/alert/alert.md.scss
@@ -18,19 +18,36 @@ $alert-md-sub-title-font-size: 16px !default;
$alert-md-message-font-size: 15px !default;
$alert-md-message-padding: 0 24px 24px 24px !default;
$alert-md-message-text-color: rgba(0,0,0,.5) !default;
+$alert-md-message-padding-empty: 0 !default;
+$alert-md-content-max-height: 240px !default;
+
+$alert-md-input-border-width: 1px !default;
+$alert-md-input-border-style: solid !default;
$alert-md-input-border-color: #dedede !default;
$alert-md-input-text-color: #000000 !default;
-$alert-md-input-highlight-color: map-get($colors-md, primary) !default;
-$alert-md-input-margin-top: 5px !default;
-$alert-md-input-margin-bottom: 5px !default;
+$alert-md-input-border-width-focused: 2px !default;
+$alert-md-input-border-style-focused: $alert-md-input-border-style !default;
+$alert-md-input-border-color-focused: map-get($colors-md, primary) !default;
+
+$alert-md-input-margin-top: 5px !default;
+$alert-md-input-margin-right: 0 !default;
+$alert-md-input-margin-bottom: 5px !default;
+$alert-md-input-margin-left: 0 !default;
+
+$alert-md-button-group-flex-wrap: wrap-reverse !default;
+$alert-md-button-group-padding: 8px 8px 8px 24px !default;
+$alert-md-button-group-justify-content: flex-end !default;
+
+$alert-md-button-padding: 10px !default;
+$alert-md-button-font-weight: 500 !default;
$alert-md-button-text-color: map-get($colors-md, primary) !default;
$alert-md-button-background-color: transparent !default;
$alert-md-button-background-color-activated: rgba(158, 158, 158, 0.2) !default;
$alert-md-button-border-radius: 2px !default;
-$alert-md-buttons-padding: 8px 8px 8px 24px !default;
-$alert-md-buttons-justify-content: flex-end !default;
+$alert-md-button-text-transform: uppercase !default;
+$alert-md-button-text-align: right !default;
.alert-wrapper {
@@ -69,10 +86,10 @@ $alert-md-buttons-justify-content: flex-end !default;
.alert-message {
font-size: $alert-md-message-font-size;
- max-height: 240px;
+ max-height: $alert-md-content-max-height;
&:empty {
- padding: 0;
+ padding: $alert-md-message-padding-empty;
}
}
@@ -81,12 +98,12 @@ $alert-md-buttons-justify-content: flex-end !default;
// --------------------------------------------------
.alert-input {
- border-bottom: 1px solid $alert-md-input-border-color;
+ border-bottom: $alert-md-input-border-width $alert-md-input-border-style $alert-md-input-border-color;
color: $alert-md-input-text-color;
- margin: $alert-md-input-margin-top 0 $alert-md-input-margin-bottom 0;
+ margin: $alert-md-input-margin-top $alert-md-input-margin-right $alert-md-input-margin-bottom $alert-md-input-margin-left;
&:focus {
- border-bottom: 2px solid $alert-md-input-highlight-color;
+ border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused $alert-md-input-border-color-focused;
margin-bottom: $alert-md-input-margin-bottom - 1;
}
}
@@ -100,7 +117,7 @@ $alert-md-buttons-justify-content: flex-end !default;
position: relative;
border-top: 1px solid $alert-md-input-border-color;
border-bottom: 1px solid $alert-md-input-border-color;
- max-height: 240px;
+ max-height: $alert-md-content-max-height;
overflow: auto;
}
@@ -215,24 +232,25 @@ $alert-md-buttons-justify-content: flex-end !default;
// --------------------------------------------------
.alert-button-group {
- padding: $alert-md-buttons-padding;
- justify-content: $alert-md-buttons-justify-content;
- flex-wrap: wrap-reverse;
+ padding: $alert-md-button-group-padding;
+ justify-content: $alert-md-button-group-justify-content;
+ flex-wrap: $alert-md-button-group-flex-wrap;
}
.alert-button {
- position: relative;
- overflow: hidden;
- padding: 10px;
- font-weight: 500;
+ padding: $alert-md-button-padding;
+ font-weight: $alert-md-button-font-weight;
color: $alert-md-button-text-color;
background-color: $alert-md-button-background-color;
border-radius: $alert-md-button-border-radius;
- text-transform: uppercase;
- text-align: right;
+ text-transform: $alert-md-button-text-transform;
+ text-align: $alert-md-button-text-align;
+
+ // necessary for ripple to work properly
+ position: relative;
+ overflow: hidden;
&.activated {
background-color: $alert-md-button-background-color-activated;
- opacity: 1;
}
}
diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts
index 8743b24936..e8e4aee1b2 100644
--- a/ionic/components/alert/alert.ts
+++ b/ionic/components/alert/alert.ts
@@ -12,8 +12,8 @@ import {ViewController} from '../nav/view-controller';
/**
* @name Alert
* @description
- * An Alert is a dialog that presents users with either information, or used
- * to receive information from the user using inputs. An alert appears on top
+ * An Alert is a dialog that presents users with information or collects
+ * information from the user using inputs. An alert appears on top
* of the app's content, and must be manually dismissed by the user before
* they can resume interaction with the app.
*
@@ -31,11 +31,11 @@ import {ViewController} from '../nav/view-controller';
* by tapping the backdrop, then it will fire the handler from the button
* with a cancel role.
*
- * Alerts can also include inputs whos data can be passed back to the app.
+ * Alerts can also include inputs whose data can be passed back to the app.
* Inputs can be used to prompt users for information.
*
- * Its shorthand is to add all the alert's options from within the
- * `Alert.create(opts)` first argument. Otherwise the alert's instance
+ * You can pass all of the alert's options in the first argument of
+ * the create method: `Alert.create(opts)`. Otherwise the alert's instance
* has methods to add options, such as `setTitle()` or `addButton()`.
*
* @usage
diff --git a/ionic/components/alert/test/basic/e2e.ts b/ionic/components/alert/test/basic/e2e.ts
new file mode 100644
index 0000000000..b102a9e214
--- /dev/null
+++ b/ionic/components/alert/test/basic/e2e.ts
@@ -0,0 +1,76 @@
+
+it('should open basic alert', function() {
+ element(by.css('.e2eOpenAlert')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open alert long message', function() {
+ element(by.css('.e2eOpenAlertLongMessage')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open alert multiple buttons', function() {
+ element(by.css('.e2eOpenMultipleButtons')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open alert no message', function() {
+ element(by.css('.e2eOpenAlertNoMessage')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open confirm alert', function() {
+ element(by.css('.e2eOpenConfirm')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open prompt alert', function() {
+ element(by.css('.e2eOpenPrompt')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open radio alert', function() {
+ element(by.css('.e2eOpenRadio')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open checkbox alert', function() {
+ element(by.css('.e2eOpenCheckbox')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
+
+it('should open and close fast close alert', function() {
+ element(by.css('.e2eFastClose')).click();
+});
+
+it('should open disabled backdrop alert', function() {
+ element(by.css('.e2eDisabledBackdrop')).click();
+});
+
+it('should close with button click', function() {
+ element(by.css('.alert-button:last-child')).click();
+});
diff --git a/ionic/components/app/id.ts b/ionic/components/app/id.ts
index 0a1b453510..4729ad0e73 100644
--- a/ionic/components/app/id.ts
+++ b/ionic/components/app/id.ts
@@ -5,9 +5,9 @@ import {IonicApp} from './app';
/**
* @name Id
* @description
- * IdRef is an easy way to identify unique components in an app and access them
+ * The `id` attribute is an easy way to identify unique components in an app and access them
* no matter where in the UI hierarchy you are. For example, this makes toggling
- * a global side menu feasible from any place in the application.
+ * a global side menu possible from any place in the application.
*
* See the [Menu section](http://ionicframework.com/docs/v2/components/#menus) of
* the Component docs for an example of how Menus rely on ID's.
diff --git a/ionic/components/button/button.ios.scss b/ionic/components/button/button.ios.scss
index 3ed3210221..5daae74cdc 100644
--- a/ionic/components/button/button.ios.scss
+++ b/ionic/components/button/button.ios.scss
@@ -55,15 +55,15 @@ $button-ios-small-icon-font-size: 1.3em !default;
@mixin ios-button-default($color-name, $color-value) {
.button-#{$color-name} {
- $bg-color: $color-value;
- $bg-color-activated: color-shade($bg-color);
- $fg-color: color-inverse($bg-color);
+ $background-color: $color-value;
+ $background-color-activated: color-shade($background-color);
+ $fg-color: color-inverse($background-color);
color: $fg-color;
- background-color: $bg-color;
+ background-color: $background-color;
&.activated {
- background-color: $bg-color-activated;
+ background-color: $background-color-activated;
}
}
diff --git a/ionic/components/button/button.md.scss b/ionic/components/button/button.md.scss
index c28b15f468..f6dc060d81 100644
--- a/ionic/components/button/button.md.scss
+++ b/ionic/components/button/button.md.scss
@@ -78,20 +78,20 @@ $button-md-small-icon-font-size: 1.4em !default;
@mixin md-button-default($color-name, $color-value) {
.button-#{$color-name} {
- $bg-color: $color-value;
- $bg-color-activated: color-shade($bg-color);
- $fg-color: color-inverse($bg-color);
+ $background-color: $color-value;
+ $background-color-activated: color-shade($background-color);
+ $fg-color: color-inverse($background-color);
color: $fg-color;
- background-color: $bg-color;
+ background-color: $background-color;
&:hover:not(.disable-hover) {
- background-color: $bg-color;
+ background-color: $background-color;
}
&.activated {
opacity: 1;
- background-color: $bg-color-activated;
+ background-color: $background-color-activated;
}
ion-button-effect {
diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts
index 14ec44ffb1..02cad24786 100644
--- a/ionic/components/button/button.ts
+++ b/ionic/components/button/button.ts
@@ -7,26 +7,29 @@ import {Toolbar} from '../toolbar/toolbar';
/**
* @name Button
* @module ionic
- * @property [outline] - for an unfilled outline button
- * @property [clear] - for a transparent button that only shows text and icons
- * @property [round] - for a button with rounded corners
- * @property [block] - for a block button that fills it's parent container
- * @property [full] - for a full width button
- * @property [small] - sets button size to small
- * @property [large] - sets button size to large
- * @property [disabled] - disables the button
- * @property [fab] - for a floating action button
- * @property [fab-left] - position a fab button to the left
- * @property [fab-right] - position a fab button to the right
- * @property [fab-center] - position a fab button towards the center
- * @property [fab-top] - position a fab button towards the top
- * @property [fab-bottom] - position a fab button towards the bottom
- * @property [color] - Dynamically set which color attribute this button should use.
+ *
* @description
- * Buttons are simple components in Ionic, can consist of text, an icon, or both, and can be enhanced with a wide range of attributes.
+ * Buttons are simple components in Ionic. They can consist of text and icons
+ * and be enhanced by a wide range of attributes.
+ *
+ * @property [outline] - A transparent button with a border.
+ * @property [clear] - A transparent button without a border.
+ * @property [round] - A button with rounded corners.
+ * @property [block] - A button that fills its parent container with a border-radius.
+ * @property [full] - A button that fills its parent container without a border-radius or borders on the left/right.
+ * @property [small] - A button with size small.
+ * @property [large] - A button with size large.
+ * @property [disabled] - A disabled button.
+ * @property [fab] - A floating action button.
+ * @property [fab-left] - Position a fab button to the left.
+ * @property [fab-right] - Position a fab button to the right.
+ * @property [fab-center] - Position a fab button towards the center.
+ * @property [fab-top] - Position a fab button towards the top.
+ * @property [fab-bottom] - Position a fab button towards the bottom.
+ * @property [color] - Dynamically set which color attribute this button should use.
+ *
* @demo /docs/v2/demos/button/
* @see {@link /docs/v2/components#buttons Button Component Docs}
-
*/
@Component({
selector: 'button:not([ion-item]),[button]',
diff --git a/ionic/components/button/test/button.spec.ts b/ionic/components/button/test/button.spec.ts
index 4f1ba8c3d0..4d5d37c091 100644
--- a/ionic/components/button/test/button.spec.ts
+++ b/ionic/components/button/test/button.spec.ts
@@ -1,4 +1,4 @@
-import {Button, Config} from 'ionic-angular';
+import {Button, Config} from '../../../../ionic';
export function run() {
diff --git a/ionic/components/checkbox/checkbox.ts b/ionic/components/checkbox/checkbox.ts
index bcb2d8dad1..ca7d6d6c28 100644
--- a/ionic/components/checkbox/checkbox.ts
+++ b/ionic/components/checkbox/checkbox.ts
@@ -10,9 +10,12 @@ const CHECKBOX_VALUE_ACCESSOR = new Provider(
/**
- * The checkbox is no different than the HTML checkbox input, except
- * it's styled accordingly to the the platform and design mode, such
- * as iOS or Material Design.
+ * @name Checkbox
+ * @module ionic
+ *
+ * @description
+ * The Checkbox is a simple component styled based on the mode. It can be
+ * placed in an `ion-item` or used as a stand-alone checkbox.
*
* See the [Angular 2 Docs](https://angular.io/docs/ts/latest/guide/forms.html)
* for more info on forms and inputs.
@@ -40,6 +43,7 @@ const CHECKBOX_VALUE_ACCESSOR = new Provider(
*
*
* ```
+ *
* @demo /docs/v2/demos/checkbox/
* @see {@link /docs/v2/components#checkbox Checkbox Component Docs}
*/
diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts
index f0ac050390..303fb66a16 100644
--- a/ionic/components/content/content.ts
+++ b/ionic/components/content/content.ts
@@ -98,7 +98,7 @@ export class Content extends Ion {
* ngAfterViewInit() {
* // Here 'my-content' is the ID of my ion-content
* this.content = this.app.getComponent('my-content');
- * this.content.addScrollEventListener(this.myScroll);
+ * this.content.addScrollListener(this.myScroll);
* }
* myScroll() {
* console.info('They see me scrolling...');
diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts
index 45b99af1b5..540299a217 100644
--- a/ionic/components/icon/icon.ts
+++ b/ionic/components/icon/icon.ts
@@ -10,12 +10,12 @@ import {Config} from '../../config/config';
* For a full list of available icons, check out the
* [Ionicons resource docs](../../../../resources/ionicons).
*
- * One feature of Ionicons is that when icon names are set, the actual icon
+ * One feature of Ionicons in Ionic is when icon names are set, the actual icon
* which is rendered can change slightly depending on the mode the app is
* running from. For example, by setting the icon name of `alarm`, on iOS the
* icon will automatically apply `ios-alarm`, and on Material Design it will
- * automatically apply `md-alarm`. This allow the developer to write the
- * markup once, and let Ionic automatically apply the appropriate icon.
+ * automatically apply `md-alarm`. This allows the developer to write the
+ * markup once while Ionic applies the appropriate icon based on the mode.
*
* @usage
* ```html
diff --git a/ionic/components/infinite-scroll/test/infinite-scroll.spec.ts b/ionic/components/infinite-scroll/test/infinite-scroll.spec.ts
index 89bd7c035d..fdfd049b20 100644
--- a/ionic/components/infinite-scroll/test/infinite-scroll.spec.ts
+++ b/ionic/components/infinite-scroll/test/infinite-scroll.spec.ts
@@ -1,4 +1,4 @@
-import {InfiniteScroll, Content, Config} from 'ionic-angular';
+import {InfiniteScroll, Content, Config} from '../../../../ionic';
export function run() {
diff --git a/ionic/components/input/test/text-input.spec.ts b/ionic/components/input/test/text-input.spec.ts
index 991f9585d7..e0ffdf3c0b 100644
--- a/ionic/components/input/test/text-input.spec.ts
+++ b/ionic/components/input/test/text-input.spec.ts
@@ -1,4 +1,4 @@
-import {TextInput} from 'ionic-angular';
+import {TextInput} from '../../../../ionic';
export function run() {
diff --git a/ionic/components/label/label.ts b/ionic/components/label/label.ts
index bef41feb2c..280c4d8366 100644
--- a/ionic/components/label/label.ts
+++ b/ionic/components/label/label.ts
@@ -4,10 +4,8 @@ import {Directive, ElementRef, Renderer, Input, Optional, Attribute} from 'angul
/**
* @name Label
* @description
- * Labels describe the data that the user should enter in to an input
- * element. You can give `ion-label` attributes to tell it how to
- * handle its display type, which is especially useful for an
- * `ion-item` which contains a text input.
+ * Labels are placed inside of an `ion-item` element and can be used
+ * to describe an `ion-input`, `ion-toggle`, `ion-checkbox`, and more.
*
* @property [fixed] - a persistant label that sits next the the input
* @property [floating] - a label that will float about the input if the input is empty of looses focus
@@ -22,7 +20,7 @@ import {Directive, ElementRef, Renderer, Input, Optional, Attribute} from 'angul
*
*
*
- * Website
+ * Website
*
*
*
@@ -36,6 +34,15 @@ import {Directive, ElementRef, Renderer, Input, Optional, Attribute} from 'angul
*
*
*
+ *
+ * Toggle
+ *
+ *
+ *
+ *
+ * Checkbox
+ *
+ *
* ```
*
* @demo /docs/v2/demos/label/
diff --git a/ionic/components/menu/menu-controller.ts b/ionic/components/menu/menu-controller.ts
index 161ae339fc..df22a92bd3 100644
--- a/ionic/components/menu/menu-controller.ts
+++ b/ionic/components/menu/menu-controller.ts
@@ -8,7 +8,7 @@ import {MenuType} from './menu-types';
* _For basic Menu usage, see the [Menu section](../../../../components/#menus)
* of the Component docs._
*
- * Menu is a side-menu interface that can be dragged out or toggled to open or closed.
+ * Menu is a side-menu interface that can be dragged and toggled to open or close.
* An Ionic app can have numerous menus, all of which can be controlled within
* template HTML, or programmatically.
*
diff --git a/ionic/components/menu/test/menu.spec.ts b/ionic/components/menu/test/menu.spec.ts
index adb2cff552..611f2ff3ff 100644
--- a/ionic/components/menu/test/menu.spec.ts
+++ b/ionic/components/menu/test/menu.spec.ts
@@ -1,4 +1,4 @@
-import {MenuController, Menu} from 'ionic-angular';
+import {MenuController, Menu} from '../../../../ionic';
export function run() {
describe('MenuController', () => {
diff --git a/ionic/components/nav/test/nav-controller.spec.ts b/ionic/components/nav/test/nav-controller.spec.ts
index 5cd9a271cf..c41494028a 100644
--- a/ionic/components/nav/test/nav-controller.spec.ts
+++ b/ionic/components/nav/test/nav-controller.spec.ts
@@ -1,4 +1,4 @@
-import {NavController, Tabs, NavOptions, Config, ViewController} from 'ionic-angular';
+import {NavController, Tabs, NavOptions, Config, ViewController} from '../../../../ionic';
export function run() {
describe('NavController', () => {
diff --git a/ionic/components/navbar/navbar.ts b/ionic/components/navbar/navbar.ts
index 4774ec9fd3..4f4dce9aed 100644
--- a/ionic/components/navbar/navbar.ts
+++ b/ionic/components/navbar/navbar.ts
@@ -63,17 +63,14 @@ class ToolbarBackground {
* @name Navbar
* @description
* Navbar is a global level toolbar that gets updated every time a page gets
- * loaded. You can pass the navbar a `ion-title` or any number of buttons.
+ * loaded. You can pass the navbar an `ion-title`, any number of buttons, a segment, or a searchbar.
*
* @usage
* ```html
*
- *
- *
- *
- * toggle
- *
- *
+ *
+ *
+ *
*
*
* Page Title
@@ -81,7 +78,7 @@ class ToolbarBackground {
*
*
*
- * Modal
+ *
*
*
*
diff --git a/ionic/components/refresher/test/refresher.spec.ts b/ionic/components/refresher/test/refresher.spec.ts
index 3cf20416eb..2044a2356b 100644
--- a/ionic/components/refresher/test/refresher.spec.ts
+++ b/ionic/components/refresher/test/refresher.spec.ts
@@ -1,4 +1,4 @@
-import {Refresher, Content, Config, Ion} from 'ionic-angular';
+import {Refresher, Content, Config, Ion} from '../../../../ionic';
export function run() {
diff --git a/ionic/components/segment/segment.ios.scss b/ionic/components/segment/segment.ios.scss
index 62d552dcef..cb7fd807f2 100644
--- a/ionic/components/segment/segment.ios.scss
+++ b/ionic/components/segment/segment.ios.scss
@@ -4,10 +4,10 @@
// iOS Segment
// --------------------------------------------------
-$segment-button-ios-bg-color: transparent !default;
-$segment-button-ios-bg-color-activated: $toolbar-ios-active-color !default;
+$segment-button-ios-background-color: transparent !default;
+$segment-button-ios-background-color-activated: $toolbar-ios-active-color !default;
-$segment-button-ios-text-color: color-inverse($segment-button-ios-bg-color-activated) !default;
+$segment-button-ios-text-color: color-inverse($segment-button-ios-background-color-activated) !default;
$segment-button-ios-activated-transition: 100ms all linear !default;
$segment-button-ios-hover-transition: 100ms all linear !default;
$segment-button-ios-active-transition: 100ms all linear !default;
@@ -37,10 +37,10 @@ $segment-button-ios-toolbar-icon-line-height: 2.4rem !default;
border-width: $segment-button-ios-border-width;
border-style: solid;
- border-color: $segment-button-ios-bg-color-activated;
+ border-color: $segment-button-ios-background-color-activated;
- color: $segment-button-ios-bg-color-activated;
- background-color: $segment-button-ios-bg-color;
+ color: $segment-button-ios-background-color-activated;
+ background-color: $segment-button-ios-background-color;
flex: 1;
width: 0;
@@ -53,17 +53,17 @@ $segment-button-ios-toolbar-icon-line-height: 2.4rem !default;
&.segment-activated {
opacity: 1;
color: $segment-button-ios-text-color;
- background-color: $segment-button-ios-bg-color-activated;
+ background-color: $segment-button-ios-background-color-activated;
transition: $segment-button-ios-activated-transition;
}
&:hover:not(.segment-activated) {
- background-color: rgba($segment-button-ios-bg-color-activated, $segment-button-ios-hover-opacity);
+ background-color: rgba($segment-button-ios-background-color-activated, $segment-button-ios-hover-opacity);
transition: $segment-button-ios-hover-transition;
}
&:active:not(.segment-activated) {
- background-color: rgba($segment-button-ios-bg-color-activated, $segment-button-ios-active-opacity);
+ background-color: rgba($segment-button-ios-background-color-activated, $segment-button-ios-active-opacity);
transition: $segment-button-ios-active-transition;
}
diff --git a/ionic/components/show-hide-when/show-hide-when.ts b/ionic/components/show-hide-when/show-hide-when.ts
index b655369890..65b5c68111 100644
--- a/ionic/components/show-hide-when/show-hide-when.ts
+++ b/ionic/components/show-hide-when/show-hide-when.ts
@@ -65,7 +65,25 @@ export class DisplayWhen {
* Complements the [hideWhen attribute](../HideWhen).
* @usage
* ```html
- * I am only visible on iOS!
+ *
+ * I am visible on Android!
+ *
+ *
+ *
+ * I am visible on iOS!
+ *
+ *
+ *
+ * I am visible on Android and iOS!
+ *
+ *
+ *
+ * I am visible on Portrait!
+ *
+ *
+ *
+ * I am visible on Landscape!
+ *
* ```
* @demo /docs/v2/demos/show-when/
* @see {@link ../HideWhen HideWhen API Docs}
@@ -103,8 +121,27 @@ export class ShowWhen extends DisplayWhen {
* Complements the [showWhen attribute](../ShowWhen).
* @usage
* ```html
- * I am hidden on Android!
+ *
+ * I am hidden on Android!
+ *
+ *
+ *
+ * I am hidden on iOS!
+ *
+ *
+ *
+ * I am hidden on Android and iOS!
+ *
+ *
+ *
+ * I am hidden on Portrait!
+ *
+ *
+ *
+ * I am hidden on Landscape!
+ *
* ```
+ *
* @demo /docs/v2/demos/hide-when/
* @see {@link ../ShowWhen ShowWhen API Docs}
*/
diff --git a/ionic/components/tap-click/test/tapClick.spec.ts b/ionic/components/tap-click/test/tapClick.spec.ts
index 5ef164aeba..235191c17c 100644
--- a/ionic/components/tap-click/test/tapClick.spec.ts
+++ b/ionic/components/tap-click/test/tapClick.spec.ts
@@ -1,4 +1,4 @@
-import * as tapClick from 'ionic-angular';
+import * as tapClick from '../../../../ionic';
export function run() {
diff --git a/ionic/config/config.ts b/ionic/config/config.ts
index 0f11e5e377..639a9ca765 100644
--- a/ionic/config/config.ts
+++ b/ionic/config/config.ts
@@ -13,7 +13,8 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util';
* @name Config
* @demo /docs/v2/demos/config/
* @description
- * Config lets you change multiple or a single value in an apps mode configuration. Things such as tab placement, icon changes, and view animations can be set here.
+ * The Config lets you configure your entire app or specific platforms.
+ * You can set the tab placement, icon mode, animations, and more here.
*
* ```ts
* @App({
@@ -29,7 +30,7 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util';
* })
* ```
*
- * Or change the whole mode
+ * To change the mode to always use Material Design (md).
*
* ```ts
* @App({
@@ -40,7 +41,7 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util';
* })
* ```
*
- * Config can be overwritting at multiple levels, allowing deeper configuration. Taking the example from earlier, we can override any setting we want based on a platform.
+ * Config can be overwritten at multiple levels allowing for more configuration. Taking the example from earlier, we can override any setting we want based on a platform.
* ```ts
* @App({
* template: ` `
@@ -63,8 +64,6 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util';
*
* ```
*
- * The property will override anything else set in the apps.
- *
* The last way we could configure is through URL query strings. This is useful for testing while in the browser.
* Simply add `?ionic=` to the url.
*
diff --git a/ionic/config/test/config.spec.ts b/ionic/config/test/config.spec.ts
index e0f28f88b4..7a15da88da 100644
--- a/ionic/config/test/config.spec.ts
+++ b/ionic/config/test/config.spec.ts
@@ -1,4 +1,4 @@
-import {Config, Platform, ionicProviders} from 'ionic-angular';
+import {Config, Platform, ionicProviders} from '../../../ionic';
export function run() {
diff --git a/ionic/platform/test/platform.spec.ts b/ionic/platform/test/platform.spec.ts
index 5191bbe7f0..03807648e4 100644
--- a/ionic/platform/test/platform.spec.ts
+++ b/ionic/platform/test/platform.spec.ts
@@ -1,4 +1,4 @@
-import {Platform} from 'ionic-angular';
+import {Platform} from '../../../ionic';
export function run() {
diff --git a/ionic/util/events.ts b/ionic/util/events.ts
index 3aa444ac21..413e4b459d 100644
--- a/ionic/util/events.ts
+++ b/ionic/util/events.ts
@@ -1,8 +1,9 @@
/**
* @name Events
* @description
- * Events is a pub/sub style event system for sending and responding to application-level
+ * Events is a publish-subscribe style event system for sending and responding to application-level
* events across your app.
+ *
* @usage
* ```ts
* // first page (publish an event when a user is created)
diff --git a/ionic/util/keyboard.ts b/ionic/util/keyboard.ts
index 0d3c0bc558..7614041539 100644
--- a/ionic/util/keyboard.ts
+++ b/ionic/util/keyboard.ts
@@ -7,7 +7,7 @@ import {hasFocusedTextInput, raf, rafFrames} from './dom';
/**
* @name Keyboard
* @description
- * The `Keyboard` class allows you to work with the keyboard events provide by the Ionic keyboard plugin.
+ * The `Keyboard` class allows you to work with the keyboard events provided by the Ionic keyboard plugin.
*
* @usage
* ```ts
diff --git a/ionic/util/test/util.spec.ts b/ionic/util/test/util.spec.ts
index 040fad43df..fe314e63cc 100644
--- a/ionic/util/test/util.spec.ts
+++ b/ionic/util/test/util.spec.ts
@@ -1,4 +1,4 @@
-import * as util from 'ionic-angular/util';
+import * as util from '../../../ionic/util';
export function run() {
describe('extend', function() {
diff --git a/package.json b/package.json
index d45fc9cb35..b6d223da2e 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"private": "true",
"name": "ionic2",
- "version": "2.0.0-beta.1",
+ "version": "2.0.0-beta.2",
"license": "MIT",
"repository": {
"type": "git",
@@ -58,6 +58,7 @@
"html-entities": "^1.1.3",
"htmlparser2": "^3.8.3",
"ionic-cz-conventional-changelog": "^1.0.0",
+ "jasmine-core": "^2.4.1",
"jasmine-node": "^1.14.5",
"js-yaml": "^3.4.2",
"karma": "^0.12.31",
@@ -88,4 +89,4 @@
"path": "node_modules/ionic-cz-conventional-changelog"
}
}
-}
\ No newline at end of file
+}
diff --git a/scripts/README.md b/scripts/README.md
index c43b0ea196..6c93576df2 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -37,10 +37,10 @@ From `ionic` directory:
From your app directory:
-1. `npm link ionic-framework`
+1. `npm link ionic-angular`
2. `ionic serve` or `ionic run` or `ionic emulate`
-To remove the linked version of `ionic-framework` do `npm rm ionic-framework`, and then reinstall using `npm install ionic-framework`.
+To remove the linked version of `ionic-angular` do `npm rm ionic-angular`, and then reinstall using `npm install ionic-angular`.
### Running Snapshot
diff --git a/scripts/karma/karma.conf.js b/scripts/karma/karma.conf.js
index 17214bbda3..e2ddc4b2ea 100644
--- a/scripts/karma/karma.conf.js
+++ b/scripts/karma/karma.conf.js
@@ -1,5 +1,7 @@
var buildConfig = require('../build/config');
+
+
module.exports = function(config) {
config.set({
singleRun: true,
@@ -8,7 +10,8 @@ module.exports = function(config) {
frameworks: ['jasmine'],
files: [
- 'node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.js',
+ 'node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.js', //npm2
+ 'node_modules/es6-module-loader/dist/es6-module-loader.src.js', //npm3
'node_modules/systemjs/dist/system.js',
'scripts/karma/system.config.js',
'node_modules/angular2/bundles/angular2-polyfills.min.js',
diff --git a/scripts/karma/system.config.js b/scripts/karma/system.config.js
index 6c902ad8ea..01c9ac6c5d 100644
--- a/scripts/karma/system.config.js
+++ b/scripts/karma/system.config.js
@@ -1,6 +1,7 @@
System.config({
map: {
- 'angular2': '/base/angular2'
+ 'angular2': '/base/angular2',
+ 'ionic-angular': '/base/ionic'
},
packages: {
'ionic-angular': {
diff --git a/scripts/npm/README.md b/scripts/npm/README.md
index c04e8eff8d..597c4d67ca 100644
--- a/scripts/npm/README.md
+++ b/scripts/npm/README.md
@@ -11,7 +11,7 @@ In the root of the package are ES5 sources in the CommonJS module format, their
Usually, the only Javascript file required by the user is `ionic.js`, as everything from Ionic can be imported from this file:
```
- import {App, Page} from 'ionic-framework/ionic';
+ import {App, Page} from 'ionic-angular';
```
### Bundles
@@ -20,7 +20,7 @@ Minified and unminified CommonJS and System.register module format bundles, as w
### Installation and More
-To use Ionic 2, we recommend installing and utilizing the Ionic CLI which will help you create pre-configured Ionic apps.
+To use Ionic 2, we recommend installing and utilizing the Ionic CLI which will help you create pre-configured Ionic apps.
For full instructions on using Ionic 2, please visit the [Ionic 2 Documentation](http://ionicframework.com/docs/v2/)
diff --git a/tooling/generators/page/page.tmpl.js b/tooling/generators/page/page.tmpl.js
index 94ef5b5e8c..753e82c4a4 100644
--- a/tooling/generators/page/page.tmpl.js
+++ b/tooling/generators/page/page.tmpl.js
@@ -1,5 +1,4 @@
import {Page, NavController} from 'ionic-angular';
-import {Inject} from 'angular2/core';
/*
Generated class for the <%= jsClassName %> page.
@@ -11,7 +10,11 @@ import {Inject} from 'angular2/core';
templateUrl: 'build/<%= directory %>/<%= fileName %>/<%= fileName %>.html',
})
export class <%= jsClassName %> {
- constructor(@Inject(NavController) nav) {
+ static get parameters() {
+ return [[NavController]];
+ }
+
+ constructor(nav) {
this.nav = nav;
}
}
diff --git a/tooling/generators/tabs/tabs.tmpl.js b/tooling/generators/tabs/tabs.tmpl.js
index 1fb0b072f1..41b1072d2e 100644
--- a/tooling/generators/tabs/tabs.tmpl.js
+++ b/tooling/generators/tabs/tabs.tmpl.js
@@ -1,5 +1,4 @@
import {NavController, Page} from 'ionic-angular';
-import {Inject} from 'angular2/core';
<% _.forEach(tabs, function(tab) { %>import {<%= tab.jsClassName %>} from '../<%= tab.fileName %>/<%= tab.fileName %>';
<% }); %>
@@ -7,7 +6,11 @@ import {Inject} from 'angular2/core';
templateUrl: 'build/<%= directory %>/<%= fileName %>/<%= fileName %>.html'
})
export class <%= jsClassName %> {
- constructor(@Inject(NavController) nav) {
+ static get parameters() {
+ return [[NavController]];
+ }
+
+ constructor(nav) {
// set the root pages for each tab
<% _.forEach(tabs, function(tab, i) { %>this.tab<%= ++i %>Root = <%= tab.jsClassName %>;
<% }); %>
diff --git a/tsconfig.json b/tsconfig.json
index 7e3ef0b0a9..f4ab03bd64 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,8 +7,10 @@
"declaration": true,
"outDir": "dist"
},
- "files": [
- "ionic/index.ts",
+ "exclude": [
+ "node_modules",
+ "scripts",
+ "typings/main",
"typings/main.d.ts"
],
"compileOnSave" : false,