Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Metronic sticky head, sticky portlet #8969


User avatar
0
adamphones created

Hi

I would like to enable stick head and sticky portlet [https://keenthemes.com/metronic/preview/demo1/components/portlets/sticky-head.html](see here) for metronic template.

I tried to add data-sticky="true" as it described in the doc but no success.

Any idea how this would be achieved?

Regards,


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I assume you are using Angular version of AspNet Zero. You can just execute this line in your component, https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/assets/metronic/core/app.js#L107.

  • User Avatar
    0
    adamphones created

    Hi Ismail,

    Yes it is the latest angular.

    Where exactly? Do I need to install Sticky? or it is part of metronic already.

    I can't execute var sticky = new Sticky('[data-sticky="true"]'); line anywhere in any component.

    Id appriciate if you could send an example.

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @adamphones,

    Yes, it is in Metronic's source code. I haven't tried this but, applying steps below should work;

    1. Add declare var Sticky: any; // Related to Metronic to typings.d.ts file.
    2. Then, you can use var sticky = new Sticky('[data-sticky="true"]'); in ngAfterViewInit of your page's component.