Created
February 28, 2014 12:16
-
-
Save mndvns/9270113 to your computer and use it in GitHub Desktop.
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
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