nuList BootStrap Label With erase & Buffer Demo
Using BootStrap Label as customized list items with on click remove & buffer.
by Kamalakar Gadireddy
HTML
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css">
<link rel="stylesheet" href="http://gkodes.github.io/ngul/dist/mime.fugue.min.css">
<link rel="stylesheet" href="http://gkodes.github.io/ngul/dist/theme.bootstrap.min.css">
<link rel="stylesheet" href="http://gkodes.github.io/ngul/dist/theme.default.min.css">
<link rel="stylesheet" href="http://gkodes.github.io/ngul/dist/nu.min.css">
<script src="http://code.angularjs.org/1.2.14/angular.min.js"></script>
<script src="http://gkodes.github.io/ngul/dist/nu.min.js"></script>
<div class="container-fluid">
<div ng-controller="demoCtrl">
<nu-list src="tags"><span class="label label-info erase" ng-click="$erase()">{{item}}</span>
<buffer type="txt" />
</nu-list>
</div>
</div>
CSS
.nu.list .label {
font-size: 14px;
margin: 0 2px;
-o-user-select: none;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
cursor: default;
}
.nu.list .erase {
padding-left: 15px;
padding-right: 15px;
/* For the animation effect */
transition: all .25s linear 0s;
-o-transition: all .25s linear 0s;
-ms-transition: all .25s linear 0s;
-moz-transition: all .25s linear 0s;
-webkit-transition: all .25s linear 0s;
}
.nu.list .erase:before {
padding: 4px 9px 0;
}
JavaScript
var demo = angular.module('nu.Deno', ['nu.List']);
demo.controller('demoCtrl', function ($scope) {
$scope.tags = ['Marquetta Bartell',
'Alethia Marvin',
'Roxanna Runolfsson'];
});
angular.element(document).ready(function () {
angular.bootstrap(document, ['nu.Deno']);
});