angularjs and bootstrap javascript

前端 未结 4 716
闹比i
闹比i 2020-12-20 00:27

I have a twitter bootstrap carousel in an angular app. If I use the data-slide attribute thus:



        
4条回答
  •  甜味超标
    2020-12-20 01:16

    No, it's not the right way. Do not do any DOM modifications inside the controller, ever. There are no exceptions on that. It's just bad practise.

    What you want to do is use directives.

    Here is the link to help you get started: http://docs.angularjs.org/guide/directive

提交回复
热议问题