Angularjs bootstrap dropdown not working

前端 未结 9 2102
时光取名叫无心
时光取名叫无心 2021-01-01 10:39

Am bit new to angularjs and bootstrap.

Am trying to add a simple dropdown. But it is not working.

Tried out the suggestion @ Bootstrap 3 simple dropdown not

9条回答
  •  心在旅途
    2021-01-01 11:30

    NOTE: Most answers here are outdated! The main issue is that the dropdown directive is not available as a class anymore, but only as an attribute, and that it has been renamed to uib-dropdown.

    I was stuck here for a while, but changing the class into an attribute worked as a charm.

    Also, you need to use the 'uib-' prefix for each directive instead of plain names.

  • a
  • (And of course, make sure you did not forget to include the ui.bootstrap module in your app.)

    var app = angular.module('App', ['ui.router','ui.bootstrap']);
    

提交回复
热议问题