javascript - Dynamically assigning ng-model inside a form -
similar dynamically assign ng-model except solutions provided assign same element. want assign elements inside element.
for example given form
<form name="myform" my-directive controller="mycontroller me"> <input name="email"> <input name="password"> <button type="submit" ng-click="me.submit()"> </form> i transform to
<form name="myform" my-directive controller="mycontroller me"> <input name="email" ng-model="email"> <input name="password" ng-model="password"> <button type="submit" ng-click="me.submit()"> </form> i thinking compile "pre" $compile seem side effect of ng-click being assigned twice.
Comments
Post a Comment