javascript - Arithmetic operations in ember handlebars -


I am trying to calculate the difference between the two variables in handlers - how amber js can i get Am I Is Using a Script Tag a Good Idea? The following are my handbags file

  {{# everybody in view.block.infodata.weatherData}} & lt; Tr & gt; & Lt; TD & gt; & Lt; Div & gt; & Lt; Font size = "3" & gt; {{Data.name}} & lt; / Font & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Font size = "3" & gt; {{Data.currentValue.tempInFarenhiet}} & lt; / Font & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Font size = "3" & gt; {{Data.pastValue.tempInFarenhiet}} & lt; / Font & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Font size = "3" & gt; {{Data.currentValue.tempInFarenhiet - data.pastValue.tempInFarenhiet}} & lt; / Font & gt; & Lt; / TD & gt; & Lt; / TR & gt; {{/ Every}}  

Does the handlers have a function in Persuflot?

Thanks in advance.

Make a handler assistant to calculate Which you can use in this way:

  {{temp-difference data.currentValue.tempInFarenhiet data.pastValue.tempInFarenhiet}}  

Create Help Folders Caller temp-difference.js

  Export Default Ember.Handlebars.makeBoundHelper (function (current value, pastValue) {new EmberHandlebars.SafeString (parseInt (current Value - previous value, 10));});  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -