javascript - Ember JS Loading and Error Substates -


I want to confirm the point of view here that every relationship in my model is unconscious / lazy. While submitting records, the handlers are showing before the population data on the template screen. In the dummy example given below, red border is shown to all users in the group, and they have a deliberable delay in getting all the populations.

I have looked and I do not think I need to have the blank loading template (please correct me if I am wrong); I just want to show an empty section, and the template popup (here: red border and name) only when the user's name is populated.

  Models.User = DS.Model.extend ({email: DS.attr ("string"), first name: DS.attr ("string"), group: DS.belongsTo ( "Group", {async: true})}); Models.Group = DS.Model.extend ({title: DS.attr ("string"), user: DS.hasMany ("user", {async: true}),}); {{# Group of users}} {{#if user.isLoaded}} {{! - I have also tried the user .isFulfilled, user.firstName, user.email -}} & lt; Div style = "border: # FADAD solid 1px;" & gt; {{User.firstName}} & lt; / Div & gt; {{/ If}} {{/ each}}  

Take a look at JSN

Explanation:

Search form (search text box and submit button is constant). Depending on the search term, the segment that shows results is changing.

I have used Loading property, this idea sets it to the right before calling the server. I, the message is loading, then the success of the request (i.e. the server with the necessary data Answer is given) Set this to false, so that the 'loading' message is hidden and the results section can be displayed.


Comments