How to load AngularJS on a directive
An example of how to load AngularJS on a custom directive.
HTML
<body>
<h1>The Directive</h1>
<hello-mike ng-app="app"></hello-mike>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script>
angular.module('app', [])
.directive('helloMike', function() {
return {
restrict: 'E',
template: '<input type="text" ng-model="name"><p>Hello, {{name}}!</p>'
}
})
</script>
</body>