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

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

java - SmsManager sending message more than one -