Dropwizard Mustache's Render not woking.
{{person.name}}{{lastname}} from java POJO working. but "hello {{name}}"
not working.
Can we handle events, such as change in select using Dropwizard Mustache.
<html>
<head>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.min.js"></script>
</head>
<body>
<!-- calls getPerson().getName() and sanitizes it -->
<h1>Hello, {{person.name}} {{lastname}}</h1>
<div id="myTemplate">hello {{name}}</div>
</body>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var myTemplate = $("#myTemplate").html();
console.log(myTemplate);
var obj = {
name: "sachin"
};
var filledTemlate = Mustache.render(myTemplate, obj);
console.log(filledTemlate);
$("#myTemplate").html(filledTemlate);
});
</script>
</html>
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dropwizard-user/00511727-e9de-475a-965a-ad902d1f0163o%40googlegroups.com.