Skip to content

Instantly share code, notes, and snippets.

@ckentq
Created December 30, 2013 04:30
Show Gist options
  • Save ckentq/8177832 to your computer and use it in GitHub Desktop.
Save ckentq/8177832 to your computer and use it in GitHub Desktop.
$scope.search = ->
# console.log $scope.keyword
#延遲送出200ms
$timeout ->
if $scope.dateMark
filter.updateAt = $scope.dateMark
filter.keyWord = $scope.keyword
console.log filter
userStream.get filter, (result) ->
if result.success
$scope.accountList = result.data
if filter.updateAt or _.size(result.data) is 30
#get result last as new filter.updateTime
last = _.last(result.data)
$scope.dateMark = last.updateAt
else
$scope.accountList = null
, 800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment