Thanks to visit codestin.com
Credit goes to github.com

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.

Unable to use ng-model-options on the same tag as ng-app when ng-app is on html tag #16535

Closed
@mdelorimier

Description

@mdelorimier

I'm submitting a ...

  • bug report
  • feature request
  • other

Current behavior:

When using ngModelOptions on the same tag as the ngApp, the value of defaultModelOptions gets set to undefined. This causes errors for every ngModel directive in the template.
The error seems to come from NgModelOptionsController $onInit where the parentOptions is undefined and the createChild method can't be executed.

Expected / new behavior:

There should not be an error when a ngModelOption is defined on the same tag as an ngApp.
Or, it should be present in the migration documentation.

Minimal reproduction of the problem with instructions:

https://plnkr.co/edit/jOmVWDvIFuOyOWB2

AngularJS version: 1.6.10

Browser: Chrome 65, probably in all browsers

Anything else:

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions