Help me to improve the performance of my directive


#1

Hello mates,

I have created a directive for hide or show the navbar or FAB button in the content scroll. The code and documentation is on github: https://github.com/marcusvbp/hsonscroll-ionic

But I want improve two things.

First, the performance of content.resize() is a bit laggy, but I don’t find another solution. Maybe it’s a question of code.
(reference: http://ionicframework.com/docs/v2/api/components/content/Content/#resize)

Second, I want to call the method .close() in FAB button before the animation starts (I want to close the fab list if is opened), but I can’t find a way to get the host component with his original methods.
(reference: http://ionicframework.com/docs/v2/api/components/fab/FabContainer/#close)

Thank you all!


#2

@marcusvbp

In the youtube video i see you’re hiding the navbar and on the 2nd page you’re using transparent header but on scroll header becomes not transparent.

Do you mind sharing some code?

Thanks


#3

Hi,

All code is in github. At this moment I don’t have free time to work on this directive.

Thanks.


#4

What code do you want to see exactly? How to start with a transparent navbar --> colored navbar?