When using `$parse` with a stateful interceptor and the expression
is `undefined`, then return the result from the interceptor
NOTE from Igor: this is not the best solution. We need to refactor
this and one-time + $interpolate code to properly fix this. @caitp
is on it. See discussion in the PR.
Closes#9821Closes#9825
In these two instances, Angular was spelled with a lower-case "a." All occurrences should be spelled
consistently.
Compound adjectives preceding the noun they modify should generally be hyphenated (cf Chicago Manual
of Style, 6.40), e.g., "so-called directives."
Closes#9896
By including the `ngAria` module, `ngMessages` will automatically include the aria-live
attribute with an assertive voice, allowing validation messages to be spoken throuhg a
screenreader.
Closes#9834
The `$compile` public API documentation indicates that
a transclude function may be passed as a second parameter, but
it was not clear that this is **not** the same function that is given
to directive link functions as the `transcludeFn` parameter.
We would like to be able to pass in a transclude function the public
linking function that is returned from `$compile` if we wish to, for
example, use lazy compilation inside a directive.
Doing so, however, highlighted two bugs:
* First, the transclude function would get rebound, incorrectly, changing
its scope from its original binding.
* Second, the `containingScope` would not be updated and the wrong
`$parent` would be assigned to the `transcludedScope` resulting in a
memory leak.
This patch fixes both of these issues.
It also converts various private optional positional parameters on `publicLinkFn`
into an `options` parameter, which is an object hash. The new `options`
parameter is documented as part of the public API.
Thanks to @lgalfaso, @tbosch, and @petebacondarwin.
Closes#9413
When writing tests it's often useful to check the number of child scopes
or watchers within the current current scope subtree. Common use-case for advanced
directives is to test that the directive is properly cleaning up after itself. These
new methods simplify writing assertions that verify that child scopes were properly
destroyed or that watchers were deregistered.
Closes#9926Closes#9871
This one caught me out for a while because, despite the note underneath, I didn't notice the addition
of <div class="phone-images"> and it's repeater until later.
Closes#9924
The bullet points at the beginning of the article were a little hard to understand because they
didn't follow the grammatical form of the preceding articles. I hope these small modifications make
it a little easier for someone else to read.
Closes#9922
There is an excellent explanation for the need for this in the documentation that may be helpful to
tutorial users, so I added a link to it.
Closes#9919
Changes:
- add rule requireSpaceBeforeBlockStatements (require space before brace when opening block statement)
- add operators to rule disallowSpaceAfterPrefixUnaryOperators (no space after prefix inc/dec ops)
- add rule disallowSpaceBeforePostfixUnaryOperators (no space before postfix inc/dec ops)
- add rule disallowSpacesInsideArrayBrackets (array literals no longer padded with spaces)
- add rule requireCommaBeforeLineBreak (line can't start with comma token)
- add rule validateLineBreaks (require LF linebreaks)
Closes#9792
Fixes a regression where the option/select values would always be set to
the key or index of a value within the corresponding collection. Prior to
some 1.3.0 refactoring, the result of the track expression would be bound
to the value, but this behavior was not documented or explicitly tested. A
cache was added in order to improve performance getting the associated
value for a given track expression.
This commit adds one explicit test for this behavior, and changes several
other trackBy tests to reflect the desired behavior as well.
Closes#9718Fixes#9592
var phoneNameColumn = element.all(by.repeater('phone in phones').column('{{phone.name}}'));
should be
var phoneNameColumn = element.all(by.repeater('phone in phones').column('phone.name'));
Closes#9823
Commit 22b817ec11 changed the url
used by protractor in all docs tests to prepend "build/docs", which
was already set to the `baseUrl` in `protractor-jenkins.conf`. This
commit just changes the protractor config's `baseUrl` to adapt
to the changes in the spec files.
Closes#9783
Currently, `undefined` is returned. However, the desired behavior is to
return `null` when the controller is optional and not found.
(If this breaks your app, it really shouldn't .v.)
Closes#9404Closes#9392