Wednesday 15 January 2014

AngularJS using bootstrap's JS -



AngularJS using bootstrap's JS -

i writing angularjs app , ran issue in combination bootstrap's js. if want buttons below deed should (have 'active' class added when clicked , exclusive) need bootstrap's js.

<div class="btn-group" data-toggle="buttons"> <label class="btn btn-primary"> <input type="radio" value="one" ng-model="mydata[$index].number"> 1 </label> <label class="btn btn-primary"> <input type="radio" value="two" ng-model="mydata[$index].number"> 2 </label> </div>

the problem is, when utilize bootstrap's js, ng-model seems stop working , no info shown in variable.

however, when remove bootstrap's js, ng-model works expected buttons not deed should.

i tried replacing bootstrap.js angular's ui bootstrap js same results. misunderstanding utilize of bootstrap's js?

this expected behaviour of buttons. when utilize angularjs doesn't work. unfortunately bootstrap's js requires jquery ...

any help appreciated,

thanks

you should utilize angular version of bootstrap's button component. recommend these ui bootstrap or angularstrap projects.

angularjs twitter-bootstrap angular-ngmodel

No comments:

Post a Comment