udos86 / ng-dynamic-forms Goto Github PK
View Code? Open in Web Editor NEWRapid form development library for Angular
License: ISC License
Rapid form development library for Angular
License: ISC License
This is due to Angular 2 not correctly implementing radio groups
Current implementation is not the best approach and can be optimized
After I choose the file to upload, I print out the FormGroup object, but there's nothing related to the file I chose.
Am using angular cli and am running into Uncaught TypeError: uri.match is not a function angular/angular#10626
I'm including "@ng2-dynamic-forms/core": "1.0.0-alpha.8"
On build i have next error.
[default] ./node_modules/@ng2-dynamic-forms/core/src/service/dynamic-form.service.d.ts:2:34
Cannot find module './dynamic-form.model'.
So I checked npm cache package file npm-cache/@ng2-dynamic-forms/core/1.0.0-alpha.8/package.tgz
so inside of it we have src/service/dynamic-form.service.d.ts and it starts from next lines.
import { FormBuilder } from "@angular/forms";
import { DynamicFormModel } from "./dynamic-form.model";
But correct path to dynamic-form.model should be ../model/dynamic-form.model
and for example dynamic-form-control.component.d.ts has it.
Also I have error that already solved by pull request i sent today.
getting error "Type 'void' is not assignable to type 'FormGroup'" for code " this.form = this.dynamicFormService.createFormGroup(this.dynamicFormModel);" where "form: FormGroup;"
will be fixed in beta.2
Makes reinstantiating a form model from JSON object structure pretty simple. Will arrive in beta.17
Can you provide sample may be in example apphow to use validators with dynamic forms.
So how to extend base form markup to display diferent validation messages.
For example i tried with field having Validators.required attached to text field
and put <div *ngIf="control.dirty && !controlvalid">Invalid</div>
inside the template before <span *ngIf="model.help" class="help-block">{{model.help}}</span>
So I getting message in case field empty, but I asking if there more generic solution and how it was planned by developer.
Will probably arrive in beta.5 (see)!
Hello,udos86,can you help me, I want to do a click on the menu, add a new TAB, rather than as it is now click menu routing switch, the middle area is changed, how to implement
node_modules/@angular2-material/button/button.d.ts(28,14): error TS1005: '=' expected.
If I use webpack there is issue with templates loading.
to make component usable I have to copy templates (in case of bootstrap module it is dynamic-form-bootstrap.component.html) to the root of my application.
Webpack use require statement to load templates and only in this case it parses such files.
Request: make plugin flexible and works both with systemjs like now and allow to use it with webpack.
will be fixed in beta.2
core.umd.js:3433 TypeError: Cannot read property 'emit' of undefined
at DynamicFormBootstrapComponent.DynamicFormControlComponent.onFocus (core.umd.js:1262)
at DebugAppView._View_DynamicFormBootstrapComponent22._handle_focus_0_2 (DynamicFormBootstrapComponent.ngfactory.js:3566)
at core.umd.js:9678
at platform-browser.umd.js:1813
at platform-browser.umd.js:1926
at ZoneDelegate.invoke (zone.js:192)
at Object.onInvoke (core.umd.js:6220)
at ZoneDelegate.invoke (zone.js:191)
at Zone.runGuarded (zone.js:99)
at NgZoneImpl.runInnerGuarded (core.umd.js:6249)
the error occurs here:
//@ng2-dynamic-forms\core\src\component\dynamic-form-control.component.ts
onFocus($event: FocusEvent) {
this.focus.emit($event); //<<< this.focus is undefined, I can't find where it's initialized.
this.hasFocus = true;
//@exclude
console.log($event, this.model.id + " field is focused");
//@endexclude
}
First of all i must commend you for this great library you have done.
I really appreciate your work and effort.
I am trying to create a formArray with a formGroup. from the samples i can guess the library is expecting the form array at the top level not within a formgroup.
i get an error ORIGINAL EXCEPTION: Cannot find control with path: 'hh_member_names_repeat -> 0
,
I will be grateful if you can give me a hint on how i can hack this library to create a fromArray with a FormGroup.
BrowserModule
must be replaced with CommonModule
will be fixed in beta.2
hi,
is there any plan to add an Input element with remote DataSource ?
thanks
Liza
Will arrive in beta.17
will be fixed in beta.10
I'm including "@ng2-dynamic-forms/core": "1.0.0-alpha.8"
On build i have next error.
[default] ./node_modules/@ng2-dynamic-forms/core/src/service/dynamic-form.service.d.ts:2:34
Cannot find module './dynamic-form.model'.
So I checked npm cache package file npm-cache/@ng2-dynamic-forms/core/1.0.0-alpha.8/package.tgz
so inside of it we have src/service/dynamic-form.service.d.ts and it starts from next lines.
import { FormBuilder } from "@angular/forms";
import { DynamicFormModel } from "./dynamic-form.model";
But correct path to dynamic-form.model should be ../model/dynamic-form.model
and for example dynamic-form-control.component.d.ts has it.
Also I have error that already solved by pull request i sent today.
getting error "Type 'void' is not assignable to type 'FormGroup'" for code " this.form = this.dynamicFormService.createFormGroup(this.dynamicFormModel);" where "form: FormGroup;"
Will arrive in next release
This is due to Angular 2 Material currently not supporting select menues and textareas
This is due to Angular 2 Material not having upgraded to @angular/forms yet
Am working on a project with some pretty long paginated json forms. I can easily convert the forms to a similar metadata. One thing am trying to figure out is how to do pagination. Any ideas?
Here is an example project of what am trying to achieve https://github.com/enyachoke/angular2-formentry.
Great library!
Right now, input controls default to type='text'.
It would be a nice addition to be able to specify type:'number' in the form model to override the default.
will be replace by reactive implementation
I am looking for ways to expose change events to caller module(ex: basic-example.component). DynamicFormCustomComponent renders itself recursively for group/array components. what would be good way to expose blur/focus event from input component to caller component in case of group/array rendering.
Thanks
It is not well documented but it is possible to attach a validator to a FormGroup. Particularly useful for the checkbox group to require at least one checkbox in the group be checked. See this SO post for context.
will be completed with beta.9
Will be done by beta.14
Hello,udos86,I want to do a like this how to do
http://demo.b-jui.com/
Hello,
Been working with this package for just under a week now and I'm digging it. Wrote a custom UI module to deal with some additional input types we needed. So first I want to say thanks.
Now the issue:
It seems like CheckboxModelConfig should be DynamicCheckboxModelConfig to match the convention used for the other input model and config types.
Cheers
will arrive in beta.6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.