mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
App annotation/mode attribute
This commit is contained in:
@@ -11,7 +11,7 @@ $alert-ios-button-color: #007aff !default;
|
||||
$alert-ios-button-font-size: 2rem !default;
|
||||
|
||||
|
||||
.alert-ios {
|
||||
.alert[mode="ios"] {
|
||||
|
||||
.alert-container {
|
||||
border-radius: $alert-ios-border-radius;
|
||||
|
||||
@@ -8,7 +8,7 @@ $alert-material-border-radius: 4px !default;
|
||||
$alert-material-box-shadow: 0px 27px 24px 0 rgba(0, 0, 0, 0.2) !default;
|
||||
|
||||
|
||||
.alert-md {
|
||||
.alert[mode="md"] {
|
||||
|
||||
.alert-container {
|
||||
box-shadow: $alert-material-box-shadow;
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
import {Component} from 'angular2/angular2';
|
||||
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
import {App, Alert} from 'ionic/ionic';
|
||||
|
||||
|
||||
@Component({ selector: 'ion-app' })
|
||||
@IonicView({
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class IonicApp {
|
||||
constructor() {
|
||||
console.log('IonicApp Start')
|
||||
constructor(alert: Alert) {
|
||||
this.alert = alert;
|
||||
}
|
||||
showAlert() {
|
||||
console.log('Show alert');
|
||||
|
||||
Alert.open({
|
||||
showAlert() {
|
||||
this.alert.open({
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function main(ionicBootstrap) {
|
||||
ionicBootstrap(IonicApp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user