Ionic 2 Shrinking Header Directive

I just blogged on how to create an ionic 2 shrinking header directive here http://www.developerslearnit.com/2017/01/building-a-shrinking-header-directive-ionic-2-app.html

2 Likes

i will try it ASAP, i just needed it :slight_smile:

Hi, im testing this but i cant get it to work, the header is not shrinking. :frowning:

Clone the repo here https://github.com/developerslearnit/ion2-shrinking-header

1 Like

Well, If u have a menu, you need to use getElementsByClassName() in the directive and put the class in the header you want to shrink, because the getElementsByTagName() will get the header of the menu instead of the header of the active page.

I’m very thankful with you for sharing this beautiful shrinking header, wish i could like this post a thousand times.