tannerlinsley / nz-toggle

Dual and triple-state toggles for AngularJS
http://codepen.io/anon/pen/yNjyME
40 stars 29 forks source link

Bind with another input element, another input element couldn't correct affect nz-toggle #33

Open thewayiam opened 8 years ago

thewayiam commented 8 years ago

Is there any chance to make another input element bind with nz-toggle? or is there any function to set nz-toggle to true/false/null from javascript? I've try to bind nz-toggle with another input element as below, when toggle with nz-toggle, the correct value will display on input element, but when type in input element, nz-toggle will always move to middle.

<input type="text" ng-model="myValue1">
<nz-toggle tri-toggle ng-model="myValue1"></nz-toggle>
ckr commented 8 years ago

Hi,

I am not quite sure what you ate trying to achieve here. But changing the value of the model will change the toggle of the element.

Hope this helps.

migonium commented 7 years ago

have the same problem, if i declare default model state in $scope, trigger will always be in the "null" state

0xhjohnson commented 5 years ago

@migonium Did you ever find a fix to this?