ngf-max-size $digest() error with ng-file-upload in angular.js
<p>This is source code.</p>

<pre><code>&lt;div class="thumbnail" ngf-accept="'image/*'" ngf-pattern="'*.jpg,*.jpeg,*.gif,*.png'" ngf-max-size="1MB"&gt;
</code></pre>

<p>
</p>

<p>Below the Derective Html Template.</p>

<pre><code>angular.module('ptgui.imagebox',[
    'ngFileUpload'
  ])
  .directive('ptguiImagebox', ['$compile', function($compile) {
    return {
      templateUrl: 'scripts/libs/ptgui/ptgui-imagebox.html',
      restrict: 'E',
      require: 'ngModel',
      scope: {
        ngModel: "="
      },
      replace: true,
      link: function ($scope, element, attrs) {

        $scope.$watch('ngModel',function(newFile, oldFile){
          if (newFile) {
            $scope['ngModel'] = newFile;
          } else {
            $scope['ngModel'] = oldFile;
          }
        });

      }
    };
  }]);
</code></pre>

<p>Below the directive.</p>

<p>When I upload image over max_size, $digest() error comes up consistently below.</p>

<p><a href="https://i.stack.imgur.com/00rzR.png" rel="nofollow noreferrer">enter image description here</a></p>

<p>and I have one more question.
after I find solution that resolve this issue, I will make alert message when someone upload image over max_size.</p>

<p>Thank you your answer.</p>