There are some files in the examples that look like JSON and the default
$http transformResponse handler was trying to convert these from strings
to object. An example was the style.css file in the
https://docs.angularjs.org/api/ng/type/ngModel.NgModelController docs.
This commit fixes this by simply removing this transform when loading
these files.
An API was passing me numbers as strings (ex. '8.25'), and I was noticing
weird sorting behavior with `orderBy` because it was trying to sort the
numbers alphabetically.
Closes#5436
It was felt that `c` did not make it clear what the variable held. This
has been changed to `color` to match the ng-repeat expression above.
In turn the model value has been changed to `myColor` to prevent a name
collision.
Closes#7210
The build includes a little script to angular.js, which adds some CSS styles to
the page to support things like ngCloak. This script checks that angular is
not in CSP mode, but before this fix assumed that angular would be in the global
scope.
This commit, references `window.angular` instead of just `angular` because when
running angular in an environment where the top-level scope is not the window
(nodejs for example), we angular is actually a property of `window`.
Closes#7176
The example tag creates a big ugly white rectangle on the docs page, and this is not very helpful
and kind of looks bad. So GFM snippets are a better way to go.
This fix also removes the unnecessary example heading from the $cookieStore page, as there has not
been an example use of $cookieStore for 2 years now.
Closes#7279
The `whenPOST` method should return a response object containing status, response body and headers.
If omitted the following error will be thrown:
`Uncaught TypeError: Cannot read property '2' of undefined`
The documentation doesn't make it very clear, so I think it will be appropriate to add it here.
Closes#6761
Going through the commit history on GitHub, the `_angular` is for noConflict mode,
the case where you have an old reference to a variable called Angular you want to preserve.
Here is the commit that added _angular in : https://github.com/angular/angular.js/commit/12ba6cec4f
This feature was later removed here:
9faabd1ba0
The variable 'made it through', it's redundant now.
Closes#7215
The previous solution for opening Plunkers from the docs relied on tight
coupling between the docs site and the plunkr site, in particular the
URL to the example code on the docs server was hard coded in the Plunker
site.
This change goes back to the old POST method of creating a Plunker, but
with a subtle difference: In the very old docs, the content was injected
directly into the example HTML at build time. This was easy enough to
do as the example actually ran in the current page but also increased
the size of the doc page.
The new examples are run in completely separate iframes. This new version
of showing a Plunker loads the file content for the Plunker from the
server by accessing the example's manifest.json file using $http requests.
This also has the additional benefit that you can now generate plunkers
from examples that are running locally or, frankly, in any folder on any
server, such as personal builds on the Jenkins CI server.
Closes#7186Closes#7198
Based on https://github.com/angular/angular.js/issues/3244#issuecomment-41003086, I don't believe
we actually use either of these now that dgeni has replaced the old docs app. These should be
removed if Travis is green.
The i18n scripts still rely on q, so unfortunately it can't be gotten rid of just yet.
This change undoes the use of watchGroup by code that uses $interpolate, by
moving the optimizations into the $interpolate itself. While this is not ideal,
it means that we are making the existing api faster rather than require people
to use $interpolate differently in order to benefit from the speed improvements.
BREAKING CHANGE: the function returned by $interpolate
no longer has a `.parts` array set on it.
It has been replaced by two arrays:
* `.expressions`, an array of the expressions in the
interpolated text. The expressions are parsed with
$parse, with an extra layer converting them to strings
when computed
* `.separators`, an array of strings representing the
separations between interpolations in the text.
This array is **always** 1 item longer than the
`.expressions` array for easy merging with it
Given an array of expressions, if any one expression changes then the listener function fires
with an arrays of old and new values.
$scope.watchGroup([expression1, expression2, expression3], function(newVals, oldVals) {
// newVals and oldVals are arrays of values corresponding to expression1..3
...
});
Port of angular/angular.dart@a3c31ce1dd
Certain versions of IE inexplicably trigger an input event in response to a placeholder
being set.
It is not possible to sniff for this behaviour nicely as the event is not triggered if
the element is not attached to the document, and the event triggers asynchronously so
it is not possible to accomplish this without deferring DOM compilation and slowing down
load times.
Closes#2614Closes#5960
This CL fixes problems and adds test cases for changes from #6421. Changes
include fixing the algorithm for preprocessing href attribute values, as
well as supporting xlink:href attributes. Credit for the original URL
parsing algorithm still goes to @richardcrichardc.
Good work, champ!
Previously, LocationHashbangInHtml5Url, which is used when html5Mode is enabled
in browsers which do not support the history API (IE8/9), would behave very
inconsistently WRT relative URLs always being resolved relative to the app root
url.
This fix enables these legacy browsers to behave like history enabled browsers,
by processing href attributes in order to resolve urls correctly.
Closes#6162Closes#6421Closes#6899Closes#6832Closes#6834