ember.js - Ember V1.0.0-pre.2: capitalization in handlebars templates -


we using ember v1.0.0-pre.2 , our handlebars follows:

{{#each data.product}} <div>   {{details.uid}} - {{details.name}} </div> {{/each}} 

our 'data' bit json:

{     "product": [         {             "details": {                 "uid": "1",                 "name": "one"             }         },         {             "details": {                 "uid": "2",                 "name": "two"             }         },         {             "details": {                 "uid": "3",                 "name": "three"             }         },         {             "details": {                 "uid": "4",                 "name": "four"             }         },         {             "details": {                 "uid": "5",                 "name": "five"             }         }     ] } 

this fails following warning:

warning: watching undefined global, ember expects watched globals setup time run loop flushed, check typos  

when change details.whatever details.whatever warning disappears.

is design or can around somehow? data returned server in fixed format , wouldn't want use interim model if can avoid it.

ember has naming policy "instances/attributes" start lowercase letter whilst "classes" start uppercase letter. think that's running issues, if possible should de-serialising json attributes starting lowercase letters.

relevant part pulled guides (http://emberjs.com/guides/object-model/classes-and-instances/):

by convention, properties or variables hold classes capitalized, while instances not. so, example, variable person contain class, while person contain instance (usually of person class). should stick these naming conventions in ember applications.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -