mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
Merge branch '2.0' into labels-refactor
This commit is contained in:
60
CHANGELOG.md
60
CHANGELOG.md
@ -85,6 +85,66 @@
|
|||||||
* **sass:** update windows action sheet sass to use variables ([a51268cd](https://github.com/driftyco/ionic/commit/a51268cd)), references [#5651](https://github.com/driftyco/ionic/issues/5651)
|
* **sass:** update windows action sheet sass to use variables ([a51268cd](https://github.com/driftyco/ionic/commit/a51268cd)), references [#5651](https://github.com/driftyco/ionic/issues/5651)
|
||||||
* **sass:** update windows alert sass to use variables ([1e73a34](https://github.com/driftyco/ionic/commit/1e73a34)), references [#5651](https://github.com/driftyco/ionic/issues/5651)
|
* **sass:** update windows alert sass to use variables ([1e73a34](https://github.com/driftyco/ionic/commit/1e73a34)), references [#5651](https://github.com/driftyco/ionic/issues/5651)
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
#### Windows Mode
|
||||||
|
|
||||||
|
Windows platform support has been added to Ionic! The Windows mode is abbreviated as `wp`. Please go through the following steps to get your app working with the Windows mode:
|
||||||
|
|
||||||
|
1. Add this line to your project's `www/index.html` file:
|
||||||
|
|
||||||
|
```
|
||||||
|
<link wp-href="build/css/app.wp.css" rel="stylesheet">
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Add a new file named `app.wp.scss` to your project's `app/theme/` folder and then add the following code to it:
|
||||||
|
|
||||||
|
```
|
||||||
|
// http://ionicframework.com/docs/v2/theming/
|
||||||
|
|
||||||
|
|
||||||
|
// App Shared Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Shared Sass variables go in the app.variables.scss file
|
||||||
|
@import 'app.variables';
|
||||||
|
|
||||||
|
|
||||||
|
// App Windows Variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Windows only Sass variables can go here
|
||||||
|
|
||||||
|
|
||||||
|
// Ionic Windows Sass
|
||||||
|
// --------------------------------------------------
|
||||||
|
// Custom App variables must be declared before importing Ionic.
|
||||||
|
// Ionic will use its default values when a custom variable isn't provided.
|
||||||
|
@import "ionic.wp";
|
||||||
|
|
||||||
|
|
||||||
|
// App Shared Sass
|
||||||
|
// --------------------------------------------------
|
||||||
|
// All Sass files that make up this app goes into the app.core.scss file.
|
||||||
|
// For simpler CSS overrides, custom app CSS must come after Ionic's CSS.
|
||||||
|
@import 'app.core';
|
||||||
|
|
||||||
|
|
||||||
|
// App Windows Only Sass
|
||||||
|
// --------------------------------------------------
|
||||||
|
// CSS that should only apply to the Windows app
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Modify the `ionic.config.js` file to add the `wp` mode on line 9:
|
||||||
|
|
||||||
|
```
|
||||||
|
sass: {
|
||||||
|
src: ['app/theme/app.+(ios|md|wp).scss'],
|
||||||
|
dest: 'www/build/css',
|
||||||
|
include: [
|
||||||
|
'node_modules/ionic-angular',
|
||||||
|
'node_modules/ionicons/dist/scss'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
<a name="2.0.0-beta.2"></a>
|
<a name="2.0.0-beta.2"></a>
|
||||||
# [2.0.0-beta.2](https://github.com/driftyco/ionic/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2016-03-01)
|
# [2.0.0-beta.2](https://github.com/driftyco/ionic/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2016-03-01)
|
||||||
|
@ -578,6 +578,7 @@ gulp.task('build.demos', function() {
|
|||||||
var indexTemplateName = LOCAL_DEMOS ? 'index.template.dev.html' : 'index.template.html';
|
var indexTemplateName = LOCAL_DEMOS ? 'index.template.dev.html' : 'index.template.html';
|
||||||
var baseIndexTemplate = _.template(fs.readFileSync('scripts/demos/' + indexTemplateName))();
|
var baseIndexTemplate = _.template(fs.readFileSync('scripts/demos/' + indexTemplateName))();
|
||||||
|
|
||||||
|
console.log(flags);
|
||||||
if (flags.production) {
|
if (flags.production) {
|
||||||
buildDemoSass(true);
|
buildDemoSass(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -207,7 +207,42 @@ export class Alert extends ViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {object} opts Alert options
|
*
|
||||||
|
* Alert options
|
||||||
|
*
|
||||||
|
* | Property | Type | Description |
|
||||||
|
* |-----------------------|-----------|---------------------------------------------------------------------------|
|
||||||
|
* | title | `string` | The string for the alert (optional) |
|
||||||
|
* | subTitle | `string` | The subtitle for the alert (optional) |
|
||||||
|
* | message | `string` | The message for the alert (optional) |
|
||||||
|
* | cssClass | `string` | Any additional class for the alert (optional) |
|
||||||
|
* | inputs | `array` | An array of inputs for the alert. See input options. (optional) |
|
||||||
|
* | buttons | `array` | An array of buttons for the alert. See buttons options. (optional) |
|
||||||
|
* | enableBackdropDismiss | `boolean` | Wheather the alert should be dismissed by tapping the backdrop (optional) |
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Input options
|
||||||
|
*
|
||||||
|
* | Property | Type | Description |
|
||||||
|
* |-------------|-----------|-----------------------------------------------------------------|
|
||||||
|
* | type | `string` | The type the input should be, text, tel, number, etc (optional) |
|
||||||
|
* | name | `string` | The name for the input (optional) |
|
||||||
|
* | placeHolder | `string` | The input's placeholder (optional) |
|
||||||
|
* | value | `string` | The input's value (optional) |
|
||||||
|
* | label | `string` | The input's label (optional) |
|
||||||
|
* | chacked | `boolean` | Whether or not the input is checked or not (optional) |
|
||||||
|
* | id | `string` | The input's id (optional) |
|
||||||
|
*
|
||||||
|
* Button options
|
||||||
|
*
|
||||||
|
* | Property | Type | Description |
|
||||||
|
* |----------|----------|----------------------------------------------------------------|
|
||||||
|
* | text | `string` | The buttons displayed text |
|
||||||
|
* | handler | `any` | Expression that should be evaluated when the button is pressed |
|
||||||
|
* | cssClass | `string` | An additional CSS class for the button |
|
||||||
|
* | role | `string` | The buttons role, null or `cancel` |
|
||||||
|
*
|
||||||
|
* @param {object} opts Alert. See the tabel above
|
||||||
*/
|
*/
|
||||||
static create(opts: AlertOptions = {}) {
|
static create(opts: AlertOptions = {}) {
|
||||||
return new Alert(opts);
|
return new Alert(opts);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import {App, InfiniteScroll} from 'ionic-angular';
|
import {App, Page, InfiniteScroll, NavController} from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@App({
|
@Page({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class E2EApp {
|
class E2EPage1 {
|
||||||
items = [];
|
items = [];
|
||||||
|
|
||||||
constructor() {
|
constructor(private nav: NavController) {
|
||||||
for (var i = 0; i < 30; i++) {
|
for (var i = 0; i < 30; i++) {
|
||||||
this.items.push( this.items.length );
|
this.items.push( this.items.length );
|
||||||
}
|
}
|
||||||
@ -30,9 +30,33 @@ class E2EApp {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goToPage2() {
|
||||||
|
this.nav.push(E2EPage2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAsyncData() {
|
|
||||||
|
@Page({
|
||||||
|
template: '<ion-content><button (click)="nav.pop()">Pop</button></ion-content>'
|
||||||
|
})
|
||||||
|
class E2EPage2 {
|
||||||
|
|
||||||
|
constructor(private nav: NavController) {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@App({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class E2EApp {
|
||||||
|
root;
|
||||||
|
constructor() {
|
||||||
|
this.root = E2EPage1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAsyncData(): Promise<any[]> {
|
||||||
// async return mock data
|
// async return mock data
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
<ion-content>
|
<ion-content>
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item *ngFor="#item of items">
|
<button ion-item (click)="goToPage2()" *ngFor="#item of items">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</ion-item>
|
</button>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
<ion-infinite-scroll (infinite)="doInfinite($event)" threshold="100px">
|
<ion-infinite-scroll (infinite)="doInfinite($event)" threshold="100px">
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"link": "npm install && gulp src && npm link"
|
"link": "npm install && gulp src && npm link"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.6",
|
"angular2": "2.0.0-beta.8",
|
||||||
"colors": "^1.1.2",
|
"colors": "^1.1.2",
|
||||||
"es6-promise": "^3.0.2",
|
"es6-promise": "^3.0.2",
|
||||||
"es6-shim": "^0.33.6",
|
"es6-shim": "^0.33.6",
|
||||||
@ -23,8 +23,8 @@
|
|||||||
"mkdirp-no-bin": "0.5.1",
|
"mkdirp-no-bin": "0.5.1",
|
||||||
"q": "1.4.1",
|
"q": "1.4.1",
|
||||||
"reflect-metadata": "0.1.2",
|
"reflect-metadata": "0.1.2",
|
||||||
"rxjs": "5.0.0-beta.0",
|
"rxjs": "5.0.0-beta.2",
|
||||||
"zone.js": "0.5.14"
|
"zone.js": "0.5.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"canonical-path": "0.0.2",
|
"canonical-path": "0.0.2",
|
||||||
|
Reference in New Issue
Block a user