Hi guys,
How does one assign ng-model to a checkbox in simple_form? I have tried
adding it like this:
=f.input :super_admin , label: false, checked_value: true, unchecked_value:
false, as:
:boolean,:input_html=>{"ng-model"=>"superadmincbx"}
but my ng-hide does not work.
%span{"ng-hide"=>"superadmincbx"}
I'm also using the Batarang and checking/unchecking the checkbox does not
trigger the corresponding changes in the scoped item. However, in my
controller, if I add
$scope.superadmincbx = true;
it get's picked up by the checkbox(it's checked) and ng-hide works. What
am
I not seeing/doing wrong? I also have a drop-down select which works as
expected when I use:
=f.association :survey_type, as: :select,:input_html
=>{"ng-model"=>"survey_type"} which works fine.
Thanks for your help!
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/a667197a-263f-4358-95d2-eda4d8603c64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.