diff options
| author | Caitlin Potter | 2014-02-06 14:02:18 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:40 +0000 |
| commit | f7d28cd377f06224247b950680517a187a7b6749 (patch) | |
| tree | 20203b9f7bf60748bb752f325b1869415352a6f3 /src/ng/http.js | |
| parent | 2e641ac49f121a6e2cc70bd3879930b44a8a7710 (diff) | |
| download | angular.js-f7d28cd377f06224247b950680517a187a7b6749.tar.bz2 | |
docs(all): convert <pre>/</pre> snippets to GFM snippets
Diffstat (limited to 'src/ng/http.js')
| -rw-r--r-- | src/ng/http.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ng/http.js b/src/ng/http.js index aa8c4071..011b33a8 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -202,7 +202,7 @@ function $HttpProvider() { * that is used to generate an HTTP request and returns a {@link ng.$q promise} * with two $http specific methods: `success` and `error`. * - * <pre> + * ```js * $http({method: 'GET', url: '/someUrl'}). * success(function(data, status, headers, config) { * // this callback will be called asynchronously @@ -212,7 +212,7 @@ function $HttpProvider() { * // called asynchronously if an error occurs * // or server returns response with an error status. * }); - * </pre> + * ``` * * Since the returned value of calling the $http function is a `promise`, you can also use * the `then` method to register callbacks, and these callbacks will receive a single argument – @@ -241,10 +241,10 @@ function $HttpProvider() { * POST/PUT requests require request data to be provided as well, shortcut methods * were created: * - * <pre> + * ```js * $http.get('/someUrl').success(successCallback); * $http.post('/someUrl', data).success(successCallback); - * </pre> + * ``` * * Complete list of shortcut methods: * @@ -369,7 +369,7 @@ function $HttpProvider() { * resolved with a rejection. * * - * <pre> + * ```js * // register the interceptor as a service * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) { * return { @@ -422,7 +422,7 @@ function $HttpProvider() { * } * }; * }); - * </pre> + * ``` * * # Response interceptors (DEPRECATED) * @@ -440,7 +440,7 @@ function $HttpProvider() { * injected with dependencies (if specified) and returns the interceptor — a function that * takes a {@link ng.$q promise} and returns the original or a new promise. * - * <pre> + * ```js * // register the interceptor as a service * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) { * return function(promise) { @@ -466,7 +466,7 @@ function $HttpProvider() { * // same as above * } * }); - * </pre> + * ``` * * * # Security Considerations @@ -490,15 +490,15 @@ function $HttpProvider() { * Angular will automatically strip the prefix before processing it as JSON. * * For example if your server needs to return: - * <pre> + * ```js * ['one','two'] - * </pre> + * ``` * * which is vulnerable to attack, your server can return: - * <pre> + * ```js * )]}', * ['one','two'] - * </pre> + * ``` * * Angular will strip the prefix, before processing the JSON. * |
