/** * * User: Martin Donnelly * Date: 2016-09-09 * Time: 15:11 * */ (function($) { let TodayDataModel = Backbone.Model.extend({ initialize: function() { this.set('url', '/today/data'); console.log(this.get('url')); //this.update(); } }); const webSocketModel = new SOCKETMANAGER(); webSocketModel.turnOn(); window.clock = new Clock({model: new ClockModel()}); let weatherModel = new WeatherModel({geo:{coords:{latitude: 55.95, longitude: -4.5666667}}}); window.weather = new Weather({model: weatherModel}); let trainModel = new TrainModel({from:'hym', to:'dbe'}); window.train = new Train({model: trainModel}); webSocketModel.setWeather(weatherModel); webSocketModel.setTrain(trainModel); setTimeout(function(){ console.log('request update'); webSocketModel.getUpdate(); }, 500); })(jQuery);