Skip to content

Commit

Permalink
Update component api
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbc committed Oct 25, 2016
1 parent 93d845d commit b442416
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sugar/app.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
var App = Sugar.Component.extend({
init: function(config) {
config = this.cover(config, {
'target': '#app',
'model' : {
'databases': []
init: function (config) {
this.Super('init', config, {
target: '#app',
model: {
databases: []
}
});
this.Super('init', arguments);
}
});

var app = Sugar.core.create('app', App);


function loadSamples() {
function loadSamples () {
app.vm.set('databases', ENV.generateData().toArray());
Monitoring.renderRate.ping();
setTimeout(loadSamples, ENV.timeout);
Expand Down

0 comments on commit b442416

Please sign in to comment.