Currently, I am diving into the world of Angular and have encountered an issue. How can I successfully call a method from a dependency module in Angular?
app.js
(function(){
var myApp = angular.module('myApp',['map']);
myApp.filter('move', function(){
return function(name){
return walk(name);
}
});
})();
map.js
(function(){
var mapMod = angular.module('map',[]);
mapMod.factory('walk', function(){
return "walking...";
});
})();
After adding app.js and map.js to the HTML page's scripts,
ReferenceError: walk is not defined
I am determined to find a way to properly call the 'walk' method within the 'move' filter. Any suggestions?