A responsive navbar can be achieved with an ngbCollapse
directive.
These steps were used to create this responsive navbar.
isMenuCollapsed
.
ngbCollapse
directive to the element
with the navbar-collapse
CSS class. Use the
property in the component as the value for the directive.
(click)
handler to each link and set the
property on the component to true to hide the menu.
Resize your browser window to see it in action!