Skip to content

Instantly share code, notes, and snippets.

@chmouel
Last active February 9, 2017 10:03
Show Gist options
  • Save chmouel/4bf65e0198d1170cb3eda6f4145c2173 to your computer and use it in GitHub Desktop.
Save chmouel/4bf65e0198d1170cb3eda6f4145c2173 to your computer and use it in GitHub Desktop.
<html>
<head>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/js-yaml/3.7.0/js-yaml.min.js"></script>
<script type="text/javascript">
var app = angular.module("Test", []);
app.controller("T", ['$scope', '$http', function($scope, $http) {
var res = $http.get('config/frack.yaml');
res.then(function succesCB(r) {
yaml = jsyaml.load(r.data);;
console.debug(yaml);
});
}]);
</script>
</head>
<body ng-app="Test">
<div ng-controller="T">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment