Skip to content

Rework of AngularJS ng-modal -> ng-model-watch

Øyvind Evju requested to merge angularjs-hack-rework into dev

Description

To enable the rewrite of the latest modals from legacy AngularJS to Cerebral integrated AngularJS, the hack for ngModel/ngModelWatch was insufficient. In particular, we did not handle ng-repeats, such as

<label>
"ng-repeat": "item in items"
"ng-model": "$ctrl.ngModel[item.key]"
"ng-model-watch": "$ctrl.ngModelWatch[item.key]"
{{item.name}}</label>

This was due to the fact that the scope in the controller function is the scope shared by all labels (probably?), and the child scopes for each individual label in the "unwrapped" DOM are first available in the link-function.

Related issues

Notes to review (code/docs/QA)

Tests

General

  • Tests have been added that prove my fix is effective or that my feature works
  • Related tests have been modified/removed

Hypothesis testing:

  • Soak testing has been done
  • Distribution between positive / negative cases has been checked

Database

  • Includes changes to database schema
  • Includes necessary database migrations

Configuration

  • Includes changes to configuration
  • Includes configuration migration instructions in documentation

Merge checklist

  • Self-review of code has been performed.
  • Feature review and validation against specification has been performed (if applicable). Apply label: QAdone
  • Need for documentation has been evaluated and, if necessary, updated. Apply label: docsdone
  • Code and implementation has been reviewed by other core developer (including any changes based on initial review). Apply label: code reviewdone
Edited by Øyvind Evju

Merge request reports

Loading