mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
I accidentally an active
This commit is contained in:
@ -99,6 +99,7 @@ export class Segment {
|
|||||||
* Indicate a button should be selected.
|
* Indicate a button should be selected.
|
||||||
*/
|
*/
|
||||||
selected(segmentButton) {
|
selected(segmentButton) {
|
||||||
|
console.log('Selecting', segmentButton);
|
||||||
for(let button of this.buttons) {
|
for(let button of this.buttons) {
|
||||||
button.setActive(false);
|
button.setActive(false);
|
||||||
}
|
}
|
||||||
@ -118,13 +119,13 @@ export class Segment {
|
|||||||
],
|
],
|
||||||
host: {
|
host: {
|
||||||
'(click)': 'buttonClicked($event)',
|
'(click)': 'buttonClicked($event)',
|
||||||
'class.active': 'isActive'
|
'[class.active]': 'isActive'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export class SegmentButton {
|
export class SegmentButton {
|
||||||
constructor(
|
constructor(
|
||||||
@Ancestor() segment: Segment,
|
@Ancestor() segment: Segment,
|
||||||
elementRef: ElementRef,
|
elementRef: ElementRef
|
||||||
) {
|
) {
|
||||||
this.domElement = elementRef.domElement
|
this.domElement = elementRef.domElement
|
||||||
this.segment = segment;
|
this.segment = segment;
|
||||||
|
@ -11,20 +11,6 @@
|
|||||||
<ion-segment-button value="sat" button>
|
<ion-segment-button value="sat" button>
|
||||||
Satellite
|
Satellite
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<!--
|
|
||||||
<button ion-button class="active" [segment-value]="standard">
|
|
||||||
Standard
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button ion-button [segment-value]="hybrid">
|
|
||||||
Hybrid
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button #sat ion-button [segment-value]="sat">
|
|
||||||
Satellite
|
|
||||||
</button>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
<button type="submit" button primary>Submit</button>
|
<button type="submit" button primary>Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
Reference in New Issue
Block a user