Question from the AngularJS test

Write a simple AngularJS app that displays the value of the `assertion` variable.

Hard

Given the following directive:

app.directive('transformBinding', function() {
   return {
       restrict: 'A',
       link : function (scope, element, attrs) {
           element.bind('click', function () {
               element.html('{{assertion}}');
           });
       }
   };
});

The following controller:

app.controller('appController', function($scope) {
    $scope.assertion = "I have been transformed";
});

And the following template:

<div ng-controller="appController">
    <div transformBinding>click me</div>
</div>

If I click on "click me". Select the correct assertions in the list:

Author: Mathieu RobinStatus: PublishedQuestion passed 76 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!