Comments (4)
@Mongole666 just released version 1.1.2 with support for that
from forms-typed.
Add the types of the emissions
* Type encapsulating the Angular Form options:
* `emitEvent` - do we emit event;
* `onlySelf` - do we bubble up to parent
* `emitModelToViewChange` - When true or not supplied (the default), each change triggers an onChange event to update the view.
* `emitViewToModelChange` - When true or not supplied (the default), each change triggers an ngModelChange event to update the model.
*/
export interface FormEventOptions {
emitEvent?: boolean;
onlySelf?: boolean;
emitModelToViewChange?: boolean;
emitViewToModelChange?: boolean;
}
from forms-typed.
Handing ValidatorFn[] and AsyncValidatorFn[] seems to be done by just adding these to the constructor call in the types. Or am I missing something here? So can this issue be closed with a new minor version in the near future? @gparlakov
from forms-typed.
@Mongole666 yes - you are correct, I just saw that the typedFormControl
does not support that while typedFormGroup
and typedFormArray
do... Will definitely do a minor release with that, thanks.
In the mean time Validators.compose
and Validators.composeAsync
can do the trick...
const form = typedFormControl<number>(1, Validators.compose([Validators.required, Validators.minLength(1)]), Validators.composeAsync([....]))
from forms-typed.
Related Issues (20)
- Let the default form types be more generic
- Add the Angular 2.4.0 using ngx-forms-typed example
- Make npm package `ngx-show-form-component` HOT 1
- Correct Readme link for ngx-forms-typed
- Correct readme link for ngx-show-form-control
- A typed form array of typed from groups HOT 3
- Support Ivy
- npm package is not the production build HOT 4
- Add contributors page
- Order the TypedArray types
- Allow for {disabled: true, value: T} in the FormControl values HOT 1
- Incorrect README install instructions HOT 3
- NPM page missing license HOT 1
- `FormGroup.getRawValue()` is still `any` HOT 2
- if form group has multiple array? how to add TypedArraysIn? HOT 4
- Adjustments to nested typedFormArray of typedFormGroups usage HOT 7
- what if model has conditional properties? HOT 5
- forms-utils: add the async validators up the chain HOT 1
- Hey, what do you think about that solution? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forms-typed.