Skip to content

Instantly share code, notes, and snippets.

@zhangchunlin
Last active December 25, 2015 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangchunlin/6948297 to your computer and use it in GitHub Desktop.
Save zhangchunlin/6948297 to your computer and use it in GitHub Desktop.
avalon ajax example
var model = avalon.define("test", function(vm) {
vm.array =[]
})
$.ajax({
type:"GET",
url:"xxx",
success:function(json){
model.array = json.list || []
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment