Skip to content

Instantly share code, notes, and snippets.

@bclinkinbeard
Created April 5, 2015 22:14
Show Gist options
  • Save bclinkinbeard/297b86346af118de57c4 to your computer and use it in GitHub Desktop.
Save bclinkinbeard/297b86346af118de57c4 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html ng-app="app">
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style id="jsbin-css">
path {
fill: purple;
fill-opacity: 0.7;
}
.area-chart {
width: 300px;
height: 200px;
border: 1px solid black;
margin-top: 10px;
}
</style>
</head>
<body ng-controller="AppCtrl">
<span>{{msg}}</span>
<button ng-click="setSubject()">Click Me</button>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular.min.js"></script>
<script id="jsbin-javascript">
angular.module('app', [])
.controller('AppCtrl', function ($scope, $http, $cacheFactory) {
$scope.msg = 'hi';
function setSubject (subject) {
$scope.msg = Date.now();
console.log($cacheFactory.get('$http').info());
$http.get('//jsbin.com/vegaqi/1.js', {cache: true})
.then(function (result) {
});
}
$scope.setSubject = setSubject;
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html ng-app="app">
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body ng-controller="AppCtrl">
<span>{{msg}}</span>
<button ng-click="setSubject()">Click Me</button>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular.min.js"><\/script>
</body>
</html>
</script>
<script id="jsbin-source-css" type="text/css">path {
fill: purple;
fill-opacity: 0.7;
}
.area-chart {
width: 300px;
height: 200px;
border: 1px solid black;
margin-top: 10px;
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">
angular.module('app', [])
.controller('AppCtrl', function ($scope, $http, $cacheFactory) {
$scope.msg = 'hi';
function setSubject (subject) {
$scope.msg = Date.now();
console.log($cacheFactory.get('$http').info());
$http.get('//jsbin.com/vegaqi/1.js', {cache: true})
.then(function (result) {
});
}
$scope.setSubject = setSubject;
});
</script></body>
</html>
path {
fill: purple;
fill-opacity: 0.7;
}
.area-chart {
width: 300px;
height: 200px;
border: 1px solid black;
margin-top: 10px;
}
angular.module('app', [])
.controller('AppCtrl', function ($scope, $http, $cacheFactory) {
$scope.msg = 'hi';
function setSubject (subject) {
$scope.msg = Date.now();
console.log($cacheFactory.get('$http').info());
$http.get('//jsbin.com/vegaqi/1.js', {cache: true})
.then(function (result) {
});
}
$scope.setSubject = setSubject;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment