You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 4.2.4
Cross-platform modules: 4.2.1
Android Runtime: 4.2.0
iOS Runtime: 4.2.0
NativeScript-Angular: 6.1.0
Angular: 6.1.10
Describe the bug Switch doesn't appear to support binding formControl to it as it doesn't set the default value of true, as well as it doesn't respond to changes to the value. It does however change the checked attribute.
I looked here and you said you had implemented this, although you only show an example with ngModel: #72
To Reproduce
Add the NativeScriptFormsModule and ReactiveFormsModule to AppModule:
Uh oh!
There was an error while loading. Please reload this page.
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
Switch
doesn't appear to support bindingformControl
to it as it doesn't set the default value oftrue
, as well as it doesn't respond to changes to the value. It does however change thechecked
attribute.I looked here and you said you had implemented this, although you only show an example with
ngModel
: #72To Reproduce
Add the
NativeScriptFormsModule
andReactiveFormsModule
toAppModule
:Then create a form using
FormBuilder
:Then try to bind the
formControl
to theSwitch
:<Switch class="ongoing" [formControl]="form.get('ongoing.checked')"></Switch>
You will see that the value is still
false
and if you listen tovalueChanges
it doesn't emit when you change the value.Expected behavior
I expect the
formControl
value to be bound to thechecked
state when bindingformControl
to it.The text was updated successfully, but these errors were encountered: