Commits on Aug 7, 2018
  1. docs(ngRepeat): redundant "and" on line 77

    john-mantas authored and gkalpak committed Aug 4, 2018
    Closes #16657
Commits on Aug 6, 2018
  1. fix(select): allow to select first option with value `undefined`

    Narretz committed Aug 6, 2018
    Previously, the value observer incorrectly assumed a value had changed even if
    it was the first time it was set, which caused it to remove an option with
    the value `undefined` from the internal option map.
    Fixes #16653
    Closes #16656
Commits on Aug 3, 2018
  1. docs(select): remove solved known issue

    Narretz committed Aug 3, 2018
    The issue in question has been resolved some time in 2017.
    The bug report is still open, but the behavior has changed:
    Let's hope they have tests for this!
  2. docs(\$compile): add docs for ngProp and ngOn bindings

    Narretz committed Aug 3, 2018
    The docs are written as if ngProp and ngOn were regular directives,
    which makes them easier to find.
    Closes #16627
Commits on Aug 2, 2018
  1. feat($compile): add support for arbitrary DOM property and event bind…

    jbedard committed Jun 26, 2018
    Previously only arbitrary DOM attribute bindings were supported via interpolation such as
    `my-attribute="{{expression}}"` or `ng-attr-my-attribute="{{expression}}"`, and only a set of
    distinct properties could be bound. `ng-prop-*` adds support for binding expressions to any DOM
    properties. For example `ng-prop-foo="x"` will assign the value of the expression `x` to the
    `foo` property, and re-assign whenever the expression `x` changes.
    Previously only a distinct set of DOM events could be bound using directives such as `ng-click`,
    `ng-blur` etc. `ng-on-*` adds support for binding expressions to any DOM event. For example
    `ng-on-bar="barOccured($event)"` will add a listener to the "bar" event and invoke the
    `barOccured($event)` expression.
    Since HTML attributes are case-insensitive, property and event names are specified in snake_case
    for `ng-prop-*` and `ng-on-*`. For example, to bind property `fooBar` use `ng-prop-foo_bar`, to
    listen to event `fooBar` use `ng-on-foo_bar`.
    Fixes #16428
    Fixes #16235
    Closes #16614
Commits on Jul 31, 2018
  1. fix(ngMock): pass failed HTTP expectations to `$exceptionHandler`

    thorn0 authored and gkalpak committed Jul 24, 2018
    This was only partially fixed in f18dd29.
    Closes #16644
Commits on Jul 30, 2018
  1. refactor($browser): correctly export helper used in specs

    gkalpak committed Jul 19, 2018
    The helper is used in `fakeWindow.location.hash`. ATM, no test is using
    the `hash` getter, so there were no errors.
Commits on Jul 27, 2018
  1. fix($animate): avoid memory leak with `$animate.enabled(element, enab…

    gkalpak committed Jul 27, 2018
    When disabling/enabling animations on a specific element (via
    `$animate.enabled(element, enabled)`), the element is added in a map to
    track its state. Previously, the element was never removed from the map,
    causing AngularJS to hold on to the element even after it is removed
    from the DOM, thus preventing it from being garbage collected.
    This commit Fixes it by removing the element from the map on `$destroy`.
    Fixes #16637.
    Closes #16649
Commits on Jul 26, 2018
Commits on Jul 25, 2018
  1. fix(ngEventDirs): pass error in handler to $exceptionHandler when eve…

    Narretz committed Jul 13, 2018
    …nt was triggered in a digest
    This ensures that the error handling is the same for events triggered inside and outside a digest.
  2. fix(ngEventDirs): don't wrap the event handler in $apply if already i…

    markgardner authored and Narretz committed May 25, 2016
    …n $digest
    Digest cycle already in progress error can inadvertently be caused when triggering an
    element's click event while within an active digest cycle. This is due to the ngEventsDirs
    event handler always calling $rootScope.$apply regardless of the status of $rootScope.$$phase.
    Checking the phase and calling the function immediately if within an active digest cycle
    will prevent the problem without reducing current functionality.
    Closes #14673
    Closes #14674
Commits on Jul 23, 2018
  1. fix(angular.element): do not break on `cleanData()` if `_data()` retu…

    gkalpak committed Jul 22, 2018
    …rns undefined
    This shouldn't happen in supported jQuery versions (2+), but if someone
    uses the unsupported 1.x version the app will break. The change that
    causes this new behavior was introduced in b7d396b.
    Even though jQuery 1.x is not supported, it is worth avoiding the
    unnecessary breakage (given how simple).
    Fixes #16641
    Closes #16642
Commits on Jul 22, 2018
Commits on Jul 21, 2018
Commits on Jul 13, 2018
  1. docs(ngMock/$timeout): recommend `$verifyNoPendingTasks()` when appro…

    gkalpak committed Jul 2, 2018
    For historical reasons, `$timeout.verifyNoPendingTasks()` throws if
    there is any type of task pending (even if it is not a timeout). When
    calling `$timeout.verifyNoPendingTasks()`, the user is most likely
    interested in verifying pending timeouts only, which is now possible
    with `$verifyNoPendingTasks('$timeout')`.
    To raise awareness of `$verifyNoPendingTasks()`, it is mentioned in the
    error message thrown by `$timeoutverifyNoPendingTasks()` if none of the
    pending tasks is a timeout.
  2. feat(ngMock): add `$flushPendingTasks()` and `$verifyNoPendingTasks()`

    gkalpak committed Jun 27, 2018
    `$flushPendingTasks([delay])` allows flushing all pending tasks (or up
    to a specific delay). This includes `$timeout`s, `$q` promises and tasks
    scheduled via `$rootScope.$applyAsync()` and `$rootScope.$evalAsync()`.
    (ATM, it only flushes tasks scheduled via `$browser.defer()`, which does
    not include `$http` requests and `$route` transitions.)
    `$verifyNoPendingTasks([taskType])` allows verifying that there are no
    pending tasks (in general or of a specific type). This includes tasks
    flushed by `$flushPendingTasks()` as well as pending `$http` requests
    and in-progress `$route` transitions.
    `ngMock/$timeout` has `flush()` and `verifyNoPendingTasks()` methods,
    but they take all kinds of tasks into account which is confusing. For
    example, `$timeout.verifyNoPendingTasks()` can fail (even if there are
    no pending timeouts) because of an unrelated pending `$http` request.
    This behavior is retained for backwards compatibility, but the new
    methods are more generic (and thus less confusing) and also allow
    more fine-grained control (when appropriate).
    Closes #14336
  3. refactor($browser): share task-tracking code between `$browser` and `…

    gkalpak committed Jun 26, 2018
    This avoids code/logic duplication and helps the implementations stay
  4. refactor($interval): share code between `$interval` and `ngMock/$inte…

    gkalpak committed Jun 26, 2018
    This avoids code/logic duplication and helps the implementations stay
  5. refactor(ngMock/$interval): more closely follow actual `$interval`'s …

    gkalpak committed Jun 26, 2018
    …internal implementation
  6. feat(*): implement more granular pending task tracking

    gkalpak committed Jun 16, 2018
    Previously, all pending async tasks (tracked via `$browser`) are treated
    the same. I.e. things like `$$testability.whenStable()` and
    `ngMock#$timeout.verifyNoPendingTasks()` take all tasks into account.
    Yet, in some cases we might be interested in specific tasks only. For
    example, if one wants to verify there are no pending `$timeout`s, they
    don't care if there are other pending tasks, such as `$http` requests.
    Similarly, one might want to get notified when all `$http` requests have
    completed and does not care about pending promises.
    This commit adds support for more granular task tracking, by enabling
    callers to specify the type of task that is being added/removed from the
    queue and enabling listeners to be triggered when specific types of
    tasks are completed (even if there are more pending tasks of different
    The change is backwards compatible. I.e. calling the affected methods
    with no explicit task-type, behaves the same as before.
    Related to #14336.
Commits on Jul 10, 2018
  1. fix($location): fix infinite recursion/digest on URLs with special ch…

    jbedard committed Jun 24, 2018
    Some characters are treated differently by `$location` compared to `$browser` and
    the native browser. When comparing URLs across these two services this must be
    taken into account.
    Fixes #16592
    Closes #16611