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
Originally, this issue was regarding documenting `restrict: 'CM'` in the directive guide, but it
was pointed out that the restrict documentation is covered in the $compile documentation. Because of
this, a link was simply added to the $compile documentation.
However, the wording suggests that it's actually linking to the directive registration function, in
$compileProvider, so the docs will link there instead. There is a link only a paragraph below to the
$compile documentation, so this does not hurt.
Closes#5516
The main api docs page is probably the main landing page for many devs
looking to learn angular, so linking to the main guide pages would
likely help.
Closes#5869
Include mention of `ngSanitize` (and add it to the example), as well as removing (and clarifying if
needed) references to `ng-html-bind-unsafe`.
Closes#5551
The ng-change event triggers immediately, which makes a difference for text input fields and text
areas, where the JavaScript onchange event would only be called at the end of the change.
Closes#5640
Code uses module names with '2' as suffix while the explanation used the module names without the
suffix. The diagram is correct but also does not suffix the module names.
Closes#5567
This issue has been a focus of problems for some users and we discussed it on the IRC that it should
be at least documented.
~Amended the style to use bootstrap notes, I think overall it looks better and catches the eyes more
easily. However there are no anchor links to these, if these are necessary they can be added later.
Closes#3436Closes#5762
- referring to `=attr` rather than `=prop` is consistent with note under example with =customerInfo
- change `prop` to `attr` (basically `prop` refers to property in JS object, `attr` is for HTML tag)
- change the function name in description to match the name in code example
Closes#5786
When a CSS class containing transition code is added to an element then an animation should kick off.
ngAnimate doesn't do this. It only respects transition styles that are already present on the element
or on the setup class (but not the addClass animation).
This reverts commit 2b344dbd20.
I think I merged this commit prematurely and in addition to that
we found out that it's breaking google apps.
Jen Bourey will provide more info at the original PR #5681
An infinite $digest loop can be caused by expressions that invoke a promise.
The problem is that $digest does not decrement ttl unless it finds dirty changes;
it should check also if asyncQueue is empty.
Generally the condition for decrementing ttl should be the same as the
condition for terminating the $digest loop.
Fixes#2622