-
-
Save abhiomkar/e56c049d4dd43ac92a29 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/tunoge
This file contains 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> | |
<script id="jsbin-javascript"> | |
var $injector = angular.injector(['ng']); | |
var Cities = function($http) { | |
$http.get("//jsbin.com/xuyis/1.json") | |
.then(function(response) { | |
var data = response.data; | |
console.log('data: ', data); | |
}); | |
}; | |
Cities.$inject = ['$http']; | |
$injector.invoke(Cities); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var $injector = angular.injector(['ng']); | |
var Cities = function($http) { | |
$http.get("//jsbin.com/xuyis/1.json") | |
.then(function(response) { | |
var data = response.data; | |
console.log('data: ', data); | |
}); | |
}; | |
Cities.$inject = ['$http']; | |
$injector.invoke(Cities);</script></body> | |
</html> |
This file contains 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
var $injector = angular.injector(['ng']); | |
var Cities = function($http) { | |
$http.get("//jsbin.com/xuyis/1.json") | |
.then(function(response) { | |
var data = response.data; | |
console.log('data: ', data); | |
}); | |
}; | |
Cities.$inject = ['$http']; | |
$injector.invoke(Cities); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment