<!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATION --> <!-- - For *SUPPORT QUESTIONS*, use one of the [support channels](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question). - Before submitting, please **SEARCH GITHUB** for a similar issue or PR. --> **I'm submitting a ...** <!-- (check one with "x") --> - [ ] bug report - [x] feature request - [ ] other <!--(Please do not submit support requests here - see above)--> **Current behavior:** When redefine module, orgin module lost. <!-- Describe how the bug manifests / how the current features are insufficient. --> **Expected / new behavior:** Override a module, or do something whether the modele is defined or not. <!-- Describe what the behavior would be without the bug / how the feature would improve AngularJS --> **Minimal reproduction of the problem with instructions:** none <!-- If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:yBpEi4). --> **AngularJS version:** 1.x.y all <!-- Check whether this is still an issue in the most recent stable or in the snapshot AngularJS version (https://code.angularjs.org/snapshot/) --> **Browser:** [all] <!-- All browsers where this could be reproduced (and Operating System if relevant) --> **Anything else:** before the code: ``` if (requires && modules.hasOwnProperty(name)) { modules[name] = null; } ``` add: ``` if(isBoolean(requires)){ return modules.hasOwnProperty(name); } ``` then I can user like this: ``` if(angular.module('my-module', true)){ // codes } else{ // codes if not exit module 'my-module' } ``` <!-- e.g. stacktraces, related issues, suggestions how to fix -->