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

ngModel generates errors when in a form element with a ngController directive #12029

Closed
neoGeneva opened this issue Jun 4, 2015 · 2 comments
Closed

Comments

@neoGeneva
Copy link

The following HTML snippet generates errors under 1.4.0, but works with 1.3.15.

ngModelDirective generates errors in ngModelPreLink because it inadvertently references myController rather than the expected FormController.

<html>
<body ng-app="myApp">
    <form ng-controller="myController">
        <input ng-model="myModel" />
    </form>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular.js"></script>
    <script>
        angular.module("myApp", []).controller("myController", function () { 
                  return {}; 
                })
    </script>
</body>
</html>
@neoGeneva neoGeneva changed the title ngModel generates errors when in a form element with an ngController directive ngModel generates errors when in a form element with a ngController directive Jun 4, 2015
@damiengenet
Copy link

It seems we also have the same problem with 1.4.0, this worked fine with 1.4.0beta6 and 1.3.x versions.

@Narretz
Copy link
Contributor

Narretz commented Jun 5, 2015

The important part is the return inside the controller. Probably caused by 9900610

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants