Skip to content

Instantly share code, notes, and snippets.

@mndvns
Created February 28, 2014 12:16
Show Gist options
  • Save mndvns/9270113 to your computer and use it in GitHub Desktop.
Save mndvns/9270113 to your computer and use it in GitHub Desktop.
script#example-output.target(type="text/x-minstache", data-codedoc='{"json": "example-json", "html": "example-html"}').
<div id="html">{{!html}}</div>
<script type="application/json" id="json">{{!json}}</scr{{aaa}}ipt>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></scri{{aaa}}pt>
<script src="http://hypergroup.github.io/ng-hyper/code/ng-hyper-0.1.0.js"></scri{{aaa}}pt>
<script>
angular.module('app', ['ng-hyper']).config(function($injector){
var apis = document.getElementById('json').text.split('...').map(function(api){
try {
return JSON.parse(api);
} catch(e) {
// console.log('err', e);
}
});
});
angular.bootstrap(document.getElementById('html'), ['app']);
</scri{{aaa}}pt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment