I am trying to pass a simple variable value into an HTML file using ember.js. My value is contained within a json file called value.json.
My HTML code is as follows:
 <h1>I won {{App.moneyvalue}} today!</h1>
However when I pass the json call via ember, it think that the entire call is a variable:
 App = Ember.Application.create({
   moneyvalue: function () {
     return $.getJSON( "js/value.json", function( data ) {
       return data.tot;
     });
   }
  }
And returns the following:
I won function () { return $.getJSON( "js/donors.json", function( data ) { return data.tot; }); } today!
As it seems to think that moneyvalue is a string variable as opposed to a value?
The jSON file is superbasic
{
  "tot": 100
}
Where is this going wrong?