javascript - Angular - attach directive to future element -


first of all, ery new angular, sorry if question seems strange.

i know how attach basic directives ng-click elements that:

<button class="test" ng-click="clearoverlays()">remove</button> 

but how can attach directive input box dinamically generated django template language ? django code:

<ul>{{ filter.form.as_ul }}</ul> 

the future element that:

<input id="id_property_parent" name="property_parent" type="radio" value="12"> 

so ideal variant if able attach ng-change directive future element it's id ('id_property_parent')

is possible angular js framework ?

ok depends on trying achieve. see 2 different cases, can tell, yours quite simple solve. 2 cases :

  • the dynamic piece of html generated django loaded dom via ajax;
  • the dynamic piece of html inserted full document before page sent client.

correct me if wrong think case second. in case, thing have add attribute (in case ng-change) input. when angular parse document, find , compile ng-change directive without need add other js code.

so basically, question have ask more : "how add custom attribute django's form inputs?"

hope helps


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -