Last active
September 27, 2018 09:08
-
-
Save helhum/4312dec1ca8076a5a65c to your computer and use it in GitHub Desktop.
Using TS rendering
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
{namespace t=Helhum\TyposcriptRendering\ViewHelpers} | |
<button class="ajax-button" data-ajaxUri="{t:uri.ajaxAction(action: 'foo', controller: 'bar') -> f:format.htmlentities()}"> | |
Click Me | |
</button> | |
<script type="text/javascript"> | |
jQuery.ajax( | |
jQuery(".ajax-button").data("ajaxUri") | |
).done( | |
function(result) { | |
console.log(result); | |
} | |
); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Small adjustments as suggestions to prevent confusion:
https://gist.github.com/schams-net/b7d9497fa84197a74860e3ccd83794c7/revisions#diff-74a375cdfec29370533f3144386b84fe