feat(demo): include the segments

This commit is contained in:
Ken Sodemann
2017-11-22 15:17:10 -06:00
parent b3dd5fbfa8
commit 45cbe4a650
13 changed files with 60 additions and 9 deletions

View File

@ -3,7 +3,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-basic-inputs-page',
templateUrl: './basic-inputs-page.component.html',
styleUrls: ['./basic-inputs-page.component.css'],
styleUrls: ['./basic-inputs-page.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class BasicInputsPageComponent implements OnInit {

View File

@ -98,5 +98,23 @@
<ion-col></ion-col>
</ion-row>
<ion-row>
<ion-col>
<h2>Ionic Segment</h2>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-segment id="segment" color="primary" [(ngModel)]="radioValue">
<ion-segment-button value="beef" id="ion-seg-beef">Carne Asada</ion-segment-button>
<ion-segment-button value="tongue" id="ion-seg-tongue">Lengua</ion-segment-button>
<ion-segment-button value="brains" id="ion-seg-brains">Sesos</ion-segment-button>
<ion-segment-button value="tripe" id="ion-seg-tripe">Tripa</ion-segment-button>
<ion-segment-button value="chicken" id="ion-seg-chicken">Pollo</ion-segment-button>
</ion-segment>
</ion-col>
<ion-col></ion-col>
</ion-row>
</ion-grid>
<a href='home'>Home</a>

View File

@ -3,7 +3,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-group-inputs-page',
templateUrl: './group-inputs-page.component.html',
styleUrls: ['./group-inputs-page.component.css'],
styleUrls: ['./group-inputs-page.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class GroupInputsPageComponent implements OnInit {

View File

@ -3,7 +3,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-home-page',
templateUrl: './home-page.component.html',
styleUrls: ['./home-page.component.css'],
styleUrls: ['./home-page.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class HomePageComponent implements OnInit {

View File

@ -6,7 +6,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
// https://github.com/angular/angular/blob/5.0.2/packages/forms/src/directives/select_control_value_accessor.ts#L28-L158
@Directive({
/* tslint:disable-next-line:directive-selector */
selector: 'ion-select, ion-radio-group',
selector: 'ion-select, ion-radio-group, ion-segment',
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IonSelectValueAccessorDirective, multi: true }]
})
export class IonSelectValueAccessorDirective implements ControlValueAccessor {

View File

@ -1 +1,3 @@
/* You can add global styles to this file, and also import other style files */
// @import '~@ionic/core/src/themes/ionic.build.default';