angularjs - Accessing an angular factory object without DI -
how access angular factory object without using di angular provides? example, want have separate script adds server properties factory object outside of angular (in .cshtml file). don't want assign factory object separate variable create global variable.
i'm not sure understand 100% want achieve, if i'm not mistaken want hold of factory object "outside" of angular context.
var factoryobject = angular.injector(['nameofyourmodule']).get('factoryname');
Comments
Post a Comment