Last active
December 19, 2015 21:09
-
-
Save klaascuvelier/6018397 to your computer and use it in GitHub Desktop.
This file contains 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
// some exampe controller | |
Module.controller('Example', ['$scope', '$http', '$url', function ($scope, $http, $url) { | |
// fetch assets from php controller | |
$scope.fetchFromTo(from, to) { | |
var url = $url.get('acme_get_assets_from_to', { type: 'documents', from: from, to: to }); | |
$http.get(url) | |
.success(function () { | |
// do something with the result | |
}) | |
.error(function () { | |
// something went wrong | |
}) | |
} | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment