Last active
September 28, 2015 19:40
-
-
Save tygern/d319b0a8f96c4e0d2819 to your computer and use it in GitHub Desktop.
Angular transitive dependency
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> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body ng-app="myApp"> | |
| <div ng-controller="welcomeController"> | |
| <h1>{{message}}</h1> | |
| </div> | |
| </body> | |
| </html> |
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
| https://jsbin.com/duriworiqo/edit?html,js,output |
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
| angular.module('depB', []); | |
| angular.module('depA', ['depB']); | |
| angular.module('myApp', ['depA']); | |
| angular.module('depB').value('someValue', 'Transitive'); | |
| angular.module('myApp') | |
| .controller('welcomeController', | |
| function ($scope, someValue) { | |
| $scope.message = someValue; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment