This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs(guide/Conceptual Overview): fix external api example #15336
Merged
Conversation
This file contains hidden or 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
3 tasks
gkalpak
reviewed
Oct 29, 2016
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.
BTW, I think we could just use .get()
instead of .jsonp()
.
}]); | ||
</file> | ||
<file name="finance3.js"> | ||
angular.module('finance3', []) | ||
.factory('currencyConverter', ['$http', function($http) { | ||
var YAHOO_FINANCE_URL_PATTERN = | ||
'//query.yahooapis.com/v1/public/yql?q=select * from ' + | ||
'https://query.yahooapis.com/v1/public/yql?q=select * from ' + |
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.
Is this necessary? This won't work if the plnkr is loaded ovr http:
iirc.
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.
The plnkrs are loaded over https. I had to add it, otherwise it didn't match.
True, the api sets |
LGTM |
ellimist
pushed a commit
to ellimist/angular.js
that referenced
this pull request
Mar 15, 2017
In 1.6, urls accessed with jsonp must be whitelisted via sce. However, the yahoo finance api used in the example allows CORS access via Access-Control-Allow-Origin:"*", so we can simply use `$http.get` instead. Closes angular#15336
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
docs
What is the current behavior? (You can also link to an open issue here)
Example is broken in the snapshot because of changes to JSONP
Other information:
The example will still be broken when opened in a plnkr, because they use the stable version instead of the snapshot.