Edit in JSFiddle

//namespace
dataUrl = "//jsonplaceholder.typicode.com/users";

var User = function(user){
	user = user || {}
	this.name = m.prop(user.name ||'');
}

User.load = function(){
	return m.request({
    method: "GET",
    //background: true,
    url: dataUrl,
    type: User
  })
}

var salesWidget = {
	controller : function() {
    //any ajax loading go here  	
  	this.id = Math.floor((Math.random() * 10) + 1);
    this.users = User.load()
    console.log('Sales Widget with id:', this.id)
  },
  view : function(ctrl) {    
  	return m('.widget',
  	  m('.sales-toolbar', 'Sarles Widget For '+ ctrl.users()[0].name());
  		m('.sales-content', m('ul', ctrl.users().map(function(d) {
      return m('li', d.name());
    	})))
    )
  }  
};



//initialize
m.module(document.body, salesWidget);