I have the following context of code. But for some reason it is returning an error that myApp is not defined, when I've defined it initially and am trying to use it in multiple situations with the mod variable.
What am I doing wrong?
https://jsfiddle.net/wL54j8g9/3/
angular.module('myApp', []);
var mod = angular.module('myApp');
mod.directive('myList', myDirective);
mod.directive('myObject', myObject);
function myDirective(){
var opt = {
restrict: 'E',
template: '<ul><li>This is One</li><li>This is Two</li></ul>'
};
return opt;
}
function myObject(){
var opt = {
restrict: 'A',
template: '<p>A Bouncing Before Park Me Bird Joe You\'re She Tell Toenails Mix Gox I Matter TV Battered You\'ll Vim Didn\'t Oh Snapped Silly</p>'
};
return opt;
}