Tuesday, September 13, 2016

Error: [ng:areq] Argument 'fn' is not a function, got string


I confronted an error which is shown above during Angular application development which was little tricky to resolve.Though later we could be able to identify an issue  and fix an issue.

At time of module loading in angular we were injecting dependancy like this:

var routingApp = angular.module('routingApp', ['ngRoute'], ['ui.bootstrap']);

Actually this is a wrong way to do ,due to this it was prompting an error

Resolution : The workaround is given below as inject a dependancy in same braket rather in different one.

var routingApp = angular.module('routingApp', ['ngRoute', 'ui.bootstrap']);

Hope it will give you some brief to fix your solution



Post a Comment