M
M
Maxim Ivanov2016-07-12 15:49:40
Angular
Maxim Ivanov, 2016-07-12 15:49:40

How to dynamically create handlers in angularJS?

Here is a function that adds an element:

$scope.processCreateInfo = function(event, process){
  $('.maintext').append('<a class="greenbtn createbtn waves-effect waves-light btn" ng-click="processCreate()">Запустить процесс</a>');
 }

However, the processCreate function does not work when we click on a new element.
$scope.processCreate = function(){
  		alert(1)
  	}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2016-07-12
@splincodewd

$compile
odetocode.com/blogs/scott/archive/2014/05/07/using...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question