I have the following code:
-
Do not break the rules :) Just define the variable (empty object) in the controller and use it while defining your form. Since angular JS uses scope prototypes under the hood, when form will try to access the inner scope (to bootstrap the variable), it will first go via scope chain and try to find the same variable in the parent's scope.
Link for reference http://blog.152.org/2014/07/angular-form-element-not-attaching-to.html