The transfer of content navigation from one container to another?

Hello, the bottom line is this: there is a menu normal navigation, in her last itemon go button, click on it and there here calls a dropdown, so you need to check at initialization and when the window resize fit items navigation in this navigation, if not, throw all overflowing content in the here calls a dropdown

At the moment when initializing everything works OK, but when resize deletes all items.

What I have at the moment
https://stackblitz.com/edit/angular-nttpyc?file=sr...
April 3rd 20 at 17:35
1 answer
April 3rd 20 at 17:37
Solution
https://ng-run.com/edit/mGpNNV5K4mQirnqoMJty

Offer yourself to optimize, and translate them into streams, to make OnPush, break it into components and services and make it even more abstract and reusable.
thank you! - Elna.Gerlach commented on April 3rd 20 at 17:40
@Elna.Gerlach,
but with a better breakdown and no hidden reserves.
https://ng-run.com/edit/3XvrtfH1bQsvcDBix0Or - Karelle65 commented on April 3rd 20 at 17:43

Find more questions by tags JavaScriptAngular