ember.js - External views are slowing down rendering in emberjs -


I am using a couple of scenes to format my data in each loop. Take a closer look at my code:

Template:

  {{# each controller. Positions}} & lt; Tr & gt; & Lt; TD & gt; {{Status}} & lt; / TD & gt; & Lt; td class = "url" & gt; {{Url}} & lt; / Td> {{#each days}} {{#view Ape. Day view changes = data. Change}} & lt; td {{Bind-Entry Class = "View."}} & gt; {{data.position}} & lt; / TD & gt; {{/ view}} {{/ each}} & lt; / Tr & gt; View {{/ Every}}   

:

  App.DaysView = Ember.View.extend ({changed: 0, change: function () { If (this. ('Changed')> gt; {return 'down';} if (this. ('Converged') <0) {return 'up';}} .property ()});   

I am trying to add a class. Data Status upper zero and "up." Class when data.position is below zero. This works fine but it is very slow The reason for being slow is using external ideas How can I improve my code? Should I take the argument to the controller and use conditional?

I'm not seeing anything that can slow down your app. If you are displaying thousands of records, there may be a problem, but I think this is not your case.

I think you can use a unique HTML element like this:

  App.DaysView = Ember.View.extend ({tagname: 'TD Ember.computed.gt ('changed', 0), below: Ember.computed .lt ('changed', 0), changed: 0}), ' ;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -