/** * Created by martin on 11/23/16. */ let TempModel = Backbone.Model.extend({}); let Temp = Backbone.View.extend({ tagName: 'div', initialize: function () { _.bindAll(this, 'render'); this.model.bind('change', this.render); this.$indoorTemp = $('#indoorTemp'); }, render: function () { console.log('Temp:Render'); const data = this.model.get('data'); this.$indoorTemp.empty().html(parseFloat(data.temp) + '°c '); } });