Angular: Empty Fiddle
http://angularjs.org/
by Kikketer
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
Hello, {{name}}!
<something> Hrmmm </something>
</div>
JavaScript
var other = angular.module('other', []);
other.directive('something', function() {
return {
restrict: 'E',
template: '<div>Yep</div>',
link: function() {
console.log('something');
}
}
});
var myApp = angular.module('myApp', ['other']);
myApp.controller('MyCtrl', function($scope) {
$scope.name = 'Superhero';
})