AngularJS Simple directive 4.2
AngularJS Simple hello world directive with click events
HTML
<div ng-app="myApp" ng-controller="ctrl">
<select ng-model="test" ng-options="c as c.label group by c.type for c in columns| filter:{type:'!field'} | filter:{type:'!map'}"></select>
</div>
CSS
</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"> <script src="//code.angularjs.org/1.1.5/angular.min.js"></script> <style>
JavaScript
var app = angular.module('myApp', []);
function ctrl($scope){
$scope.columns = [
{
type:"field",
label:"l1"
},
{
type:"t1",
label:"l2"
},
{
type:"map",
label:"l3"
},
{
type:"t2",
label:"l4"
}
];
}