Last active
June 13, 2018 17:48
-
-
Save yannbertrand/0bd1f994dee64f73f45b to your computer and use it in GitHub Desktop.
Bullshit code from Angular
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
$resource(a, b, { | |
getSomething: { | |
method: 'GET', | |
url: baseUrl + ':id' // work if you pass the `id` param in the parameters object | |
}, | |
postSomething: { | |
method: 'POST', | |
url: baseUrl + ':id', // you need to add the next line to make it work for post requests (didn't try with other verbs) | |
params: { id: '@id' } | |
} | |
}); | |
// #Consistency | |
user.id as user.name for user in users | orderBy: 'name' track by user.id | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment