Skip to content

Polymer paper-input + ng-form-control regression  #5012

Closed

Description

@Zyzle

Previously in alpha-44 it was possible to use paper-input with ng-form-control, in alpha-45 however this throws an error:

alpha-44 (working):
http://plnkr.co/edit/ApVnfj0RKWkgnCyaTnDT

alpha-45:
http://plnkr.co/edit/MoYgBAg6tJYb7b4aWUfS

The error:

Error: No value accessor for ''
    at new t (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:15:7068)
    at a (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:25:1629)
    at Object.i [as setUpControl] (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:25:1067)
    at t.onChanges (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:12:15603)
    at e.ChangeDetector_App_0.detectChangesInRecordsInternal (eval at <anonymous> (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:20:20214), <anonymous>:62:57)
    at e.detectChangesInRecords (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:20:13735)
    at e.runDetectChanges (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:20:13312)
    at e._detectChangesInShadowDomChildren (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:20:15154)
    at e.runDetectChanges (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:20:13425)
    at e.detectChanges (https://code.angularjs.org/2.0.0-alpha.45/angular2.min.js:20:13043)

Activity

  1. self-assigned this
    on Oct 29, 2015
  2. alxhub commented on Oct 29, 2015

    @alxhub
    Member

    Looks like this was broken by 56a9b02, per @robwormald. Previously <paper-input> would use the DefaultValueAccessor, now it doesn't get one.

    A workaround is to implement your own ControlValueAccessor, probably extending from DefaultValueAccessor, with a selector that matches paper-input.

    One short-term option would be to add an attribute such as ng-default-control to DefaultValueAccessor's selector, to allow that directive to be applied to an arbitrary input-like element, at least until #3011 is fixed.

  3. added this to the milestone on Nov 2, 2015
  4. alxhub commented on Nov 2, 2015

    @alxhub
    Member

    Addressed in #5076.

  5. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 7, 2019
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