Skip to content

Instantly share code, notes, and snippets.

@simon04
Last active Aug 29, 2015
Embed
What would you like to do?
For gulp-angular-filesort/issues/26
angular.module('A').controller('C', function(data) {
document.write(data.x);
});
angular.module('A', ['B']);
angular.module('B', []);
angular.module('B').service('data', function() {
return {x: 'from B'};
});
<!DOCTYPE HTML>
<html data-ng-app="A">
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
</head>
<body data-ng-controller="C">
<script src="A-define.js"></script><!-- must be before A-controller.js -->
<script src="B-define.js"></script><!-- must be before B-service.js -->
<script src="A-controller.js"></script>
<script src="B-service.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment