mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
feat(demo): include the segments
This commit is contained in:
@ -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 {
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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';
|
||||
Reference in New Issue
Block a user