Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// 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