I'm using grunt-ember-templates for precompilation of Handlebars templates. The scripts are in following sequence:
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.runtime.min.js"></script>
<script src="/js/ember.min.js"></script>
<script src="/js/app.js"></script>
<script src="/build/templates.js"></script>
<script src="/js/router.js"></script>
.....
In templates.js
:
define(["ember"], function(Ember){
Ember.TEMPLATES["index"] = Ember.Handlebars.template(functionanonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers);
data = data || {};
var buffer = '', stack1, escapeExpression=this.escapeExpression, self=this;
function program1(depth0,data) {
var buffer = '';
...
.....
return buffer;
});
Now I get this Uncaught ReferenceError: define is not defined
Error which refers to define(["ember"], function(Ember){
. What am I doing wrong?