Newbie to AngularJS and trying to create a simple directive. The code fails with a TypeError: Cannot read property 'compile' of undefined. Any suggestions would be greatly appreciated.
JS
var xx = angular.module('myApp', []);
xx.directive('myFoo',
function(){
return
{
template:'23'
};
});
HTML
<div ng-app="myApp">
<div my-foo></div>
</div>
You can find the code and error here https://jsfiddle.net/p11qqrxx/15/