Last active
August 29, 2015 14:04
-
-
Save aeisenberg/2ef4c15adf47f107c6ff to your computer and use it in GitHub Desktop.
Angular apps are not modular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="parent"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.js" | |
type="text/javascript"></script> | |
<script type="text/javascript"> | |
angular.module('sub1', []) | |
.run(function(sub2Value) { | |
console.log(sub2Value); | |
}); | |
angular.module('sub2', []).value('sub2Value', 'I should be an error!!!'); | |
angular.module('parent', ['sub1', 'sub2']); | |
</script> | |
</head> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment