Created
April 4, 2018 16:59
-
-
Save onelittlenightmusic/53d0abf3e8b41ac73d96fd95b162f81e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<div id="editor" style="height: 600px"></div> | |
<script> | |
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ace.js', | |
()=>{ | |
var editor = ace.edit("editor"); | |
editor.setTheme("ace/theme/monokai"); | |
editor.getSession().setMode("ace/mode/javascript"); | |
}); | |
this.scope.newtoast = function() { | |
return ace.edit('editor').getSession().getValue(); | |
}; | |
</script> | |
<md-button ng-click="send({payload:newtoast()})"> | |
Click me to send a hello world | |
</md-button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment