There are some parts that we could need some cleanup.
ng-lazyloaded
, ng-lazyloading
, ng-failed-lazyloaded
)setLoadedStyle
. Right now we are setting the class names in three different ways. Normalize it (see https://github.com/tjoskar/ng-lazyload-image/pull/274#discussion_r160511311). https://github.com/tjoskar/ng-lazyload-image/blob/7b2261798a13066f23c10f353a60e636d95bad2c/src/lazyload-image.ts#L109 https://github.com/tjoskar/ng-lazyload-image/blob/7b2261798a13066f23c10f353a60e636d95bad2c/src/lazyload-image.ts#L116 https://github.com/tjoskar/ng-lazyload-image/blob/7b2261798a13066f23c10f353a60e636d95bad2c/src/lazyload-image.ts#L128window
is undefined. We are checking window
in three places: https://github.com/tjoskar/ng-lazyload-image/blob/7b2261798a13066f23c10f353a60e636d95bad2c/src/lazyload-image.directive.ts#L21 https://github.com/tjoskar/ng-lazyload-image/blob/7b2261798a13066f23c10f353a60e636d95bad2c/src/lazyload-image.directive.ts#L75 https://github.com/tjoskar/ng-lazyload-image/blob/7b2261798a13066f23c10f353a60e636d95bad2c/src/scroll-listener.ts#L20platformId
from LazyLoadImageDirective
. This was added to detect if it was server rendered (https://github.com/tjoskar/ng-lazyload-image/commit/7140a0f8f6dea1968c32bd84b7b90ede83803ed9) but was implemented in a diffrent way later on.npx tslint -c tslint.json 'src/**/*.ts'
to get the errors"strict": true
in tsconfig.json
and fix the errors"noImplicitAny": true
in tsconfig.json
and fix the errorsPull requests is more than welcome :)
Cool! I will take a look for first 5 tasks at this week.
Most helpful comment
Cool! I will take a look for first 5 tasks at this week.