Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

One-time literals cause infdig when an interceptor fn is used #16021

Closed

Description

@jbedard

Due to the interceptor wrapper for one-time bindings being different then the regular one.

This means $watch($parse("{foo: bar}", noop)) will be fine, but $watch($parse("::{foo: bar}", noop)) may throw an infdig error. It would be nice if these behaved the same other then the one-time part.

ng-class works around this by doing a deep-watch. It would be nice if such a workaround was done automatically by $parse/$watch, and preferably did not require deep watching.

Activity

  1. added this to the milestone on May 31, 2017
  2. self-assigned this
    on Jun 16, 2017
  3. modified the milestones: 1.7.0, on Jun 16, 2017
  4. jbedard commented on Jun 16, 2017

    @jbedard
    ContributorAuthor

    In addition to the hack in ng-class to avoid this, other areas like $interpolate do not workaround this issue so things like $interpolate('{{ ::{x: x} }}') produce the incorrect result (while watching) until the one-time is complete.

  5. added 4 commits that reference this issue on Jun 16, 2017
    89816c4
    48ede5f
    33701f1
    1352e40
  6. added 3 commits that reference this issue on Jul 8, 2017
    b6370cb
    96d67c4
    4157505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions