Publications are better

This commit is contained in:
Eudes Inácio
2022-02-18 15:28:30 +01:00
parent 2618cd94ad
commit 2448100fb7
11 changed files with 98 additions and 35 deletions
@@ -10,8 +10,16 @@ import { ViewPublicationsPage } from './view-publications.page';
import { HeaderPageModule } from 'src/app/shared/header/header.module';
import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
import { Attributes, IntersectionObserverHooks, LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image'; // <-- import it
export class LazyLoadImageHooks extends IntersectionObserverHooks {
setup(attributes: Attributes) {
attributes.offset = 10;
attributes.defaultImagePath = "/assets/icon/icon-no-image.svg";
attributes.errorImagePath = "/assets/icon/icon-no-image.svg";
return super.setup(attributes);
}
}
@NgModule({
imports: [
@@ -24,6 +32,7 @@ import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
LazyLoadImageModule
],
exports: [ViewPublicationsPage],
declarations: [ViewPublicationsPage]
declarations: [ViewPublicationsPage],
providers: [{provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks}]
})
export class ViewPublicationsPageModule {}