I am trying to minify my app.js code (tried several online tools). But I get the error mentioned in the question. Here's my code:
(function() {
var app = angular.module('LazyApp', []);
app.directive('lazyLoad', ['$window', function($window) {
return {
restrict: 'A',
scope : {},
link: function(scope, element, attrs) {
var images = Array.prototype.slice.call(element[0].querySelectorAll("img[data-src]"));
var videos = Array.prototype.slice.call(element[0].querySelectorAll("iframe[data-src]"));
}
}
})
}])();
What am I doing wrong?