M
M
Max2015-07-30 14:47:13
Angular
Max, 2015-07-30 14:47:13

Why doesn't the function in Angular want to work?

Hello, tell me why my function may not work.
Clicking on the title should roll back the dialog box:

<span class="title" ng-click="openTask($index)">{{ task.title }}</span>

That is, this function should work
$scope.openTask = function( id ){
    var task = $scope.tasks[id];
    $scope.activeTask = {
      title: task.title,
      description: task.description,
      done: task.done
    }
    $scope.currentTaskId = id;
    $scope.taskModal.show();
    console.log('Должно пахать');
  }

But absolutely nothing happens, and no error message is displayed in the console.
If this function is put in a button, then it works, but it does not want to appear on the header.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TekVanDo, 2015-07-30
@maxprof

You posted too little to understand why it does not work for you, because there are no problems with span jsbin.com/fukexaxuvu/edit?html,js,console,output

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question