mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
tabs fix
This commit is contained in:
@ -15,20 +15,25 @@ import * as util from 'ionic/util';
|
||||
|
||||
|
||||
@View({
|
||||
template: `
|
||||
<div class="action-menu-backdrop" (click)="_cancel()" tappable></div>
|
||||
<div class="action-menu-wrapper">
|
||||
<div class="action-menu-container">
|
||||
<div class="action-menu-group action-menu-options">
|
||||
<div class="action-menu-title" *ng-if="titleText">{{titleText}}</div>
|
||||
<button (^click)="_buttonClicked(index)" *ng-for="#b of buttons; #index = index" class="action-menu-option"><i class="icon" [class]="b.icon" *ng-if="b.icon"></i> {{b.text}}</button>
|
||||
<button *ng-if="destructiveText" (click)="_destructive()" class="destructive action-menu-destructive"><i class="icon" [class]="destructiveIcon" *ng-if="destructiveIcon"></i> {{destructiveText}}</button>
|
||||
</div>
|
||||
<div class="action-menu-group action-menu-cancel" *ng-if="cancelText">
|
||||
<button (click)="_cancel()"><i class="icon" [class]="cancelIcon"></i> {{cancelText}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
template: '' +
|
||||
'<div class="action-menu-backdrop" (click)="_cancel()" tappable></div>' +
|
||||
'<div class="action-menu-wrapper">' +
|
||||
'<div class="action-menu-container">' +
|
||||
'<div class="action-menu-group action-menu-options">' +
|
||||
'<div class="action-menu-title" *ng-if="titleText">{{titleText}}</div>' +
|
||||
'<button (^click)="_buttonClicked(index)" *ng-for="#b of buttons; #index = index" class="action-menu-option">' +
|
||||
'<i class="icon" [class]="b.icon" *ng-if="b.icon"></i> ' +
|
||||
'{{b.text}}' +
|
||||
'</button>' +
|
||||
'<button *ng-if="destructiveText" (click)="_destructive()" class="destructive action-menu-destructive">' +
|
||||
'<i class="icon" [class]="destructiveIcon" *ng-if="destructiveIcon"></i> ' +
|
||||
'{{destructiveText}}</button>' +
|
||||
'</div>' +
|
||||
'<div class="action-menu-group action-menu-cancel" *ng-if="cancelText">' +
|
||||
'<button (click)="_cancel()"><i class="icon" [class]="cancelIcon"></i> {{cancelText}}</button>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>',
|
||||
directives: [NgFor, NgIf, CSSClass, TapClick]
|
||||
})
|
||||
class ActionMenuDirective {
|
||||
|
@ -3,7 +3,7 @@ import {Component, Directive, View, Injector, NgFor, ElementRef, Optional, Paren
|
||||
import {ViewController} from '../view/view-controller';
|
||||
import {ViewItem} from '../view/view-item';
|
||||
import {Icon} from '../icon/icon';
|
||||
import {IonicComponent} from '../../config/annotations';
|
||||
import {IonicComponent, IonicView} from '../../config/annotations';
|
||||
|
||||
|
||||
@IonicComponent({
|
||||
@ -13,7 +13,7 @@ import {IonicComponent} from '../../config/annotations';
|
||||
'tabBarIcons': 'top'
|
||||
}
|
||||
})
|
||||
@View({
|
||||
@IonicView({
|
||||
template: `
|
||||
<nav class="tab-bar-container">
|
||||
<div class="tab-bar" role="tablist">
|
||||
@ -27,7 +27,7 @@ import {IonicComponent} from '../../config/annotations';
|
||||
<content></content>
|
||||
</section>
|
||||
`,
|
||||
directives: [NgFor, Icon, forwardRef(() => TabButton)]
|
||||
directives: [forwardRef(() => TabButton)]
|
||||
})
|
||||
export class Tabs extends ViewController {
|
||||
constructor(
|
||||
|
@ -170,12 +170,12 @@ class Tab2Page3 {
|
||||
|
||||
|
||||
@App({
|
||||
routes: {
|
||||
'SignIn': {
|
||||
'path': '/signin',
|
||||
'cls': SignIn,
|
||||
'root': true
|
||||
}
|
||||
routes: [
|
||||
{
|
||||
path: '/signin',
|
||||
component: SignIn,
|
||||
root: true
|
||||
}
|
||||
]
|
||||
})
|
||||
class IonicApp {}
|
||||
|
Reference in New Issue
Block a user