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.

Documentation for writing a widget is wrong #1021

Closed
@danutsu

Description

@danutsu

The widget example at http://docs.angularjs.org/guide/dev_guide.forms section "Implementing custom form control (using ngModel)" is out of date or just wrong.

The example SEEMS to work, but in reality it doesn't really do data binding correctly. For example of the underlying "content" model changes, the widget will not update (try it).

The issues are:

  • the render function is actually called $render now
  • the $render function does not take a parameter value, instead it should read the value from $viewValue

This code works better: http://jsfiddle.net/Jju2m/1/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions