Angular strap empty dropdown
by Guillaume Seguin
HTML
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/master/dist/css/bootstrap.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/mgcrea/angular-motion/master/dist/angular-motion.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.20/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.20/angular-sanitize.js"></script>
<script src="https://rawgit.com/mgcrea/angular-strap/master/dist/angular-strap.min.js"></script>
<script src="https://cdn.rawgit.com/mgcrea/angular-strap/master/dist/angular-strap.tpl.min.js"></script>
<div id="sandbox" ng-controller="bpDemoCtrl">
<ul class="list-inline">
<li ng-repeat="item in list">
<a bs-dropdown="item.sublist" data-placement="{{item.placement}}">
<span ng-bind-html="item.text"></span>
</a>
</li>
</ul>
</div>
JavaScript
'use strict';
var app = angular.module('myApp', ['mgcrea.ngStrap.dropdown', 'ngSanitize']);
app.controller('bpDemoCtrl', function($scope) {
$scope.list = [
{
text: 'Menu 1',
},
{
text: 'Menu 2',
},
{
text: 'Menu 3',
placement: 'bottom-right',
sublist: [{text: 'Another action', href: '#foo'}, {text: 'External link', href: '/auth/facebook', target: '_self'}, {text: 'Something else here', click: '$alert(\'working ngClick!\')'}, {divider: true}, {text: 'Separated link', href: '#separatedLink'}]
}
];
});