I accidentally an active

This commit is contained in:
Max Lynch
2015-06-24 15:30:09 -05:00
parent febc56c35d
commit 7e3f8d9208
2 changed files with 3 additions and 16 deletions

View File

@ -99,6 +99,7 @@ export class Segment {
* Indicate a button should be selected.
*/
selected(segmentButton) {
console.log('Selecting', segmentButton);
for(let button of this.buttons) {
button.setActive(false);
}
@ -118,13 +119,13 @@ export class Segment {
],
host: {
'(click)': 'buttonClicked($event)',
'class.active': 'isActive'
'[class.active]': 'isActive'
}
})
export class SegmentButton {
constructor(
@Ancestor() segment: Segment,
elementRef: ElementRef,
elementRef: ElementRef
) {
this.domElement = elementRef.domElement
this.segment = segment;

View File

@ -11,20 +11,6 @@
<ion-segment-button value="sat" button>
Satellite
</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>
<button type="submit" button primary>Submit</button>
</form>