0.0.1 • Published 6 years ago
strongmind-component-suite v0.0.1
Strongmind Angular Component Suite
Strongmind styled, html controls, and components (Angular v5.0.0+)
Requirements
- Angular (5.0.0+)
UI Dependency
- None
Installation
npm install sm-angular-component-suite -save
Basic usage
Import desired components in your app.module
and add it to the declarations array.
Alternatively, you can import desired components to a shared module, to make it available across all modules in your Angular application.
You need to import the Angular FormsModule and ReactiveFormsModule as well.
Example usage (NumberPickerComponent)
...
import { NumberPickerComponent } from 'sm-angular-component-suite/components';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent,
NumberPickerComponent
],
imports: [
...
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Add the sm-angular-numberpicker
directive to the page where you want to use the number picker.
<sm-angular-numberpicker [numberPickerOption]="numberPickerOptions" [(pickerValue)]="pickerValue"></sm-angular-numberpicker>
Directive Inputs and Outputs
Attribute | Type | Required | Description |
---|---|---|---|
min | input Number | No | The minimal number limit on the number picker. 0 by default |
max | input Number | No | The maximum number limit on the number picker. 100 by default |
step | input Number | No | The step value for the number picker. 1 by default |
precision | input Number | No | The decimal precision for the number picker, if the step input value is a decimal value. 1 by default |
inputDisabled | input Boolean | No | Defines if the input input should be disabled / editable by the user. false by default |
onChange | (output) Number | No | The onChange event of the component. Emits the value of the number picker, every time the user has clicked the - or + button. |
0.0.1
6 years ago