I\'m trying to separate a directive to another file, without having to declare a new module - not doing:
angular.module(\'myapp.newmodule\',[]).directive
>
When you first declare a module it needs to have the dependency argument. Afterwards you can reference that same module using only the module name argument.
/* create module */
angular.module('myapp.newmodule',['ngRoute','ngResource']);
/* declare components of same module, note same name*/
angular.module('myapp.newmodule').directive....
If you want to create new modules, you need to inject them in the main ng-app module as dependencies.
/* main ng-app module , injects another module you created below*/
angular.module('myapp.newmodule',['ngRoute','ngResource','myUploader']);
/* new module, must have dependency argument */
angular.module('myUploader',[]).directive...