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)
-
0
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.
-
0
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,
-
0
Hi @adamphones,
Yes, it is in Metronic's source code. I haven't tried this but, applying steps below should work;
- Add
declare var Sticky: any; // Related to Metronic
to typings.d.ts file. - Then, you can use
var sticky = new Sticky('[data-sticky="true"]');
inngAfterViewInit
of your page's component.
- Add