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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -