Images Rendert after AfterViewInit


Topic: Images Rendert after AfterViewInit

modernwebdesign pro premium priority asked 6 years ago

Hello,

i am using a resolver to fetch data from server before rendering component, but images are always loaded after MDBSpinningPreloader is stopped. I also checked that is not disabled by a parent component. Did anyone has an idea?

export class UserComponent implements OnInit, OnDestroy, AfterViewInit {

  constructor(
      private route: ActivatedRoute,
      private globals: Globals,
      private http: HttpClient,
      private preloader: MDBSpinningPreloader
  ) {
  }
ngAfterViewInit(): void {

    this.preloader.stop();
  }

  ngOnDestroy(): void {

    this.preloader.start();
  }

After I open the side, all content is correctly displayed. Only images are missing and popping up quit after the spinner is hidden.

Thanks!


Arkadiusz Idzikowski staff answered 6 years ago

Hello,

Could you provide more information about the problem with some code sample and reproduction steps? You can use ngIf directive to block content rendering until the data has not been loaded.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 7.0.0
  • Device: MacBook Pro
  • Browser: Safari
  • OS: OSX
  • Provided sample code: No
  • Provided link: No