How to access a variable in handlebars file that is declared in a JavaScript file. Accessing as below doesn’t work.
In JavaScript file(script.js):
(function() {
var dataForCreate = "Create";
})();
In Handlebar file(sample.hbs):
<!doctype html>
<html>
<head>
<script src="script.js"></script>
</head>
<body>
<button id="createBtn">{{dataForCreate}}</button>
</body>
</html>