AngularJS toggle button

前端 未结 6 1138
不知归路
不知归路 2021-02-01 03:41

I am trying to create a toggle button in Angular. What I have so far is:


      
6条回答
  •  梦如初夏
    2021-02-01 04:17

    for any other weary traveller...

    you could simply have used ng-if. ng-if completely excludes the element from the DOM if false, so you'd have no issues with styles when not displayed. Also there is not really a need for the button group you could just change the text of the button

    Something like this:

    
    
    

提交回复
热议问题