[angularjs] use module instead of global variable.

Who uses globals anymore?!