/* Copyright © 2016-2019 Lidor Systems. All rights reserved. This file is part of the "IntegralUI Web" Library. The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License. A copy of the License should have been installed in the product's root installation directory or it can be found at http://www.lidorsystems.com/products/web/studio/license-agreement.aspx. This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws. */ import { Component, ViewContainerRef, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core'; import { IntegralUINumericDisplayMode } from '../../integralui/components/integralui.core'; @Component({ selector: '', template: `

NumericUpDown / Overview

Display Mode:

IntegralUI NumericUpDown is a native Angular component that displays a numeric value and allows you to change it within a range of defined minimum and maximum values. This component supports ngModel directive and can be used within Angular Forms.

The component appearance changes depending on current display mode: inBound, LeftRight and UpDown. In addition, you can customize the component appearance using different colors or shapes via CSS.

The following properties and events are supported:

For more information check out the source code of this sample (numeric-updown/numeric-updown-overview.ts) file.

`, encapsulation: ViewEncapsulation.None }) export class NumericUpDownOverviewSample { public ctrlStyle: any = { general: { normal: 'num-ovw' } } public ctrlDisplayMode: IntegralUINumericDisplayMode = IntegralUINumericDisplayMode.InBound; public ctrlValue: number = 30; // An array that holds all options in the comboo box for display options in NumericUpDown component public comboDisplay: Array; constructor(){ this.comboDisplay = [ { text: "InBound" }, { text: "LeftRight" }, { text: "UpDown" } ]; } onComboDisplaySelectionChanged(e: any){ switch (e.index){ case 1: this.ctrlDisplayMode = IntegralUINumericDisplayMode.LeftRight; break; case 2: this.ctrlDisplayMode = IntegralUINumericDisplayMode.UpDown; break; default: this.ctrlDisplayMode = IntegralUINumericDisplayMode.InBound; break; } } }