Angularjs instruction code, do not understand, ask the superior to explain?

  node.js, question
 // Collection-repeat image recycling while loading
 'resetImg', function ($document) {
 return {
 restrict: 'A',
 link: function($scope, $element, $attributes) {
 var applyNewSrc = function (src) {
 var newImg = $element.clone(true);
 newImg.attr('src', src);
 $element = newImg;
 $attributes.$observe('src', applyNewSrc);
 $attributes.$observe('ngSrc', applyNewSrc);
  1. A matchreset-imgThe instruction of the attribute

  2. The that monitors the action element of the instructionsrcAndng-srcChanges in attributes

  3. srcAndng-srcWhen the attribute changes, the of the element in which it is located is updatedsrcThe property is the changed value