Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ng Form example #172

Closed
qng5150 opened this issue Nov 11, 2016 · 5 comments
Closed

Ng Form example #172

qng5150 opened this issue Nov 11, 2016 · 5 comments

Comments

@qng5150
Copy link

qng5150 commented Nov 11, 2016

I'm wondering if it's possible to add a test for using ngForm.

Currently I'm trying to write an ngForm test hower the form.controllers is empty?

@lathonez
Copy link
Owner

You'll need to elaborate on what you're doing that ClickerForm doesn't
cover.

https://github.com/lathonez/clicker/tree/master/src/components/clickerForm

On 11 Nov 2016 20:36, "shinta5150" [email protected] wrote:

I'm wondering if it's possible to add a test for using ngForm.

Currently I'm trying to write an ngForm test hower the form.controllers is
empty?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#172, or mute the thread
https://github.com/notifications/unsubscribe-auth/AG5tSPVMFtFPVtQ4-Xy4XVTZgtFKS_86ks5q9Dc5gaJpZM4Kvk7W
.

@qng5150
Copy link
Author

qng5150 commented Nov 11, 2016

Ok. Thanks. Had a look at this. Looks like the form code in clicker is manually creating the formComponent.

I'm not using the formBuilder in the constructor. Instead I'm relying on the compiler to generate the controls for me.
eg.
<ion-input [(ngModel)]="login.email" name="email" type="text" #email="ngModel" placeholder="Email" required></ion-input>

Just wondering if you've create a form similar to the above as when i debug the compiled form, it doesn't appear to have any controls bounded to the form?

@lathonez
Copy link
Owner

Ah I see. No I've always used formBuilder.

The only thing I can think of is calling fixture.detectChanges() explicitly
in the beforeEach?

Failing that I think it's one for stack overflow.

On 11 Nov 2016 21:12, "shinta5150" [email protected] wrote:

Ok. Thanks. Had a look at this. Looks like the form code in clicker is
manually creating the formComponent.

I'm not using the formBuilder in the constructor. Instead I'm relying on
the compiler to generate the controls for me.
eg.

Just wondering if you've create a form similar to the above as when i
debug the compiled form, it doesn't appear to have any controls bounded to
the form?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#172 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG5tSC_JCaSsL_889k_ecNA_nL-DcHugks5q9D-FgaJpZM4Kvk7W
.

@qng5150
Copy link
Author

qng5150 commented Nov 11, 2016

Thanks for the feedback. Will try these out

@lathonez
Copy link
Owner

#191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants