Created
September 11, 2014 16:48
-
-
Save dphase/3dab5dcf0050c2d6e831 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getTeacherIndex = (scope, page=1, filter='', schools='') -> | |
$timeout.cancel(timeoutId) if timeoutId | |
timeoutId = $timeout( -> | |
$http | |
.get("/api/v3/cjunction/teachers.json?scope=#{scope}&page=#{page}&filter=#{filter}&schools=#{schools}") | |
.then (res) -> | |
vm.teachers = res.data.teachers | |
vm.total = res.data.total | |
res.data | |
, 333) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment