-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs($http): update YQL currency exchange API example #16137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of nits. LGTM otherwise.
💯 for simplifying the example.
docs/content/guide/concepts.ngdoc
Outdated
@@ -186,7 +186,7 @@ Right now, the `InvoiceController` contains all logic of our example. When the a | |||
is a good practice to move view-independent logic from the controller into a | |||
<a name="service">{@link services service}</a>, so it can be reused by other parts | |||
of the application as well. Later on, we could also change that service to load the exchange rates | |||
from the web, e.g. by calling the Yahoo Finance API, without changing the controller. | |||
from the web, e.g. by calling the Fixer.io exchange rate API, without changing the controller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make Fixer.io
a link.
docs/content/guide/concepts.ngdoc
Outdated
@@ -300,7 +300,7 @@ to something shorter like `a`. | |||
|
|||
## Accessing the backend | |||
|
|||
Let's finish our example by fetching the exchange rates from the Yahoo Finance API. | |||
Let's finish our example by fetching the exchange rates from the Fixer.io exchange rate API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make Fixer.io
a link.
docs/content/guide/security.ngdoc
Outdated
@@ -100,7 +100,7 @@ Protection from JSON Hijacking is provided if the server prefixes all JSON reque | |||
AngularJS will automatically strip the prefix before processing it as JSON. | |||
For more information please visit {@link $http#json-vulnerability-protection JSON Hijacking Protection}. | |||
|
|||
Bear in mind that calling `$http.jsonp`, like in [our Yahoo! finance example](https://docs.angularjs.org/guide/concepts#accessing-the-backend), | |||
Bear in mind that calling `$http.jsonp`, like in [our currency exchange example](https://docs.angularjs.org/guide/concepts#accessing-the-backend), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this line in...
clause is obsolete. We no longer use jsonp
in that example for quite some time.
Please remove that part.
You know what would be awesome (not necessarily in this PR)? |
@gkalpak I've fixed those issues, and agree that some end-to-end tests would be good. When I get a chance I'll create another PR 😄 |
docs/content/guide/concepts.ngdoc
Outdated
@@ -186,7 +186,7 @@ Right now, the `InvoiceController` contains all logic of our example. When the a | |||
is a good practice to move view-independent logic from the controller into a | |||
<a name="service">{@link services service}</a>, so it can be reused by other parts | |||
of the application as well. Later on, we could also change that service to load the exchange rates | |||
from the web, e.g. by calling the Yahoo Finance API, without changing the controller. | |||
from the web, e.g. by calling the <a href="http://fixer.io" title="fixer" target="_blank">Fixer.io</a> exchange rate API, without changing the controller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.ngdoc
files understand markdown. You can use [Fixer.io](http://fixer.io)
for brevity.
docs/content/guide/security.ngdoc
Outdated
@@ -100,7 +100,7 @@ Protection from JSON Hijacking is provided if the server prefixes all JSON reque | |||
AngularJS will automatically strip the prefix before processing it as JSON. | |||
For more information please visit {@link $http#json-vulnerability-protection JSON Hijacking Protection}. | |||
|
|||
Bear in mind that calling `$http.jsonp`, like in [our Yahoo! finance example](https://docs.angularjs.org/guide/concepts#accessing-the-backend), | |||
Bear in mind that calling `$http.jsonp`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ,
. It is not necessary any more.
@gkalpak thanks, hopefully it's good to go now! |
Closes #16130
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
docs update
What is the current behavior? (You can also link to an open issue here)
Currently, the example uses YQL to fetch currency exchange rates (#16130)
What is the new behavior (if this is a feature change)?
I have updated the example to a simpler solution that uses the Fixer.io API.
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information: