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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -