Updating $provide.service method docs
The previous example provided for the service method did not work. I've updated the example to a working example.
I think this version of the example will probably make more sense to most people, and the factory method would be
a better place for this sort of example.
Closes#6008
The cookbook docs are now superceded by the guide. They are no longer available
in any menus and the only way to find them is to search for them. Remove!
Closes#5967
Before this change, an SVGAElement with an xlink:href attribute and no href or name attribute which
was compiled by the angular HTML compiler would never be clickable, due to the htmlAnchorDirective
calling event.preventDefault() due to the missing href attribute.
This change corrects this behaviour by also testing the xlink:href attribute if the element in
question is determined to be an SVG anchor tag (with the href property having type SVGAnimatedString)
Closes#5896Closes#5897
While Closure Compiler generally recommends to maintain the externs for
projects together with their source, this has not worked well for
AngularJS:
- Changes to externs must be tested; they can break clients. AngularJS
has no testing infrastructure for this.
- Changes mostly come from users inside of Google and are much more
easily submitted together with the code using them within Google's
repository.
This change deletes the externs here and adds a README.closure.md to
document the change. They will be added back to Closure Compiler in a
separate submit.
Closes#5906
This change uses the regexp from Chromium/Blink to validate emails, and corrects
an error in the validation engine, which previously considered an invalid email
to be valid. Additionally, the regexp was invalidating emails with capital
letters, however this is not the behaviour recomended in the spec, or implemented
in Chromium.
Closes#5899Closes#5924
This time I feel good about this modification to the document, the code listing
on the tutorial page for the animation.js DID NOT match what was actually IN the
file for that branch. Updated tutorial to reflect actual contents of file
Closes#5922
Before this change,
```js
$routeProvider.when('/foo/:bar|?', { ... });
```
would not have the expected effect --- the parameter would not be optional, and
the pipe would not be included in the parameter name.
Following this change, the presence of the pipe operator will typically cause an
exception to be thrown due to the fact that the generated regexp is invalid.
The net result of this change is that ? and * operators will not be masked, and
pipe operators will need to be removed, although it's unexpected that these are
being used anywhere.
Closes#5920
This removes some outdated advice which no longer is true against the latest angular version.
The information about unit testing with ngMocks remains, because it's always good to have
information like that easily found. This little snippet is not worded perfectly, and is not
a very good example unit test, so additional work is needed here.
Relates to #5206Closes#5485
the function okToGreet wasn't defined, so this example wouldn't work properly.
I've decided that instead of adding unrelated code to the example, it should just be noted that the
function is expected to be defined in the lexical scope.
Closes#5878
The $log provider returns an object and not a function, so this example, which appears to be using
the $log provider, should call it as it would be called in a real-world application.
Closes#5875