Angular Select
HTML
<div ng-app="myApp">
<div ng-controller="myCtrl">
<button ng-click="onOff = !onOff">Toggle Me</button>
<input type="text" value="" />
Toggle me? {{onOff}}
</div>
<div my-directive="myParam"></div>
</div>
JavaScript
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
// Set the starting value
$scope.onOff = false;
$scope.myParam = {stuff: "data"};
});
app.directive('myDirective', function() {
return {
scope: {
myParam: '='
},
template: '<div>Looky {{sample}}</div>',
link: function(scope, element, attrs) {
scope.sample = "here";
}
}
});