-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
navbar broken when I try to use with other component. any fix ? #3
Comments
@rainstormza thank you for using our product. Are you using HTML version or Angular version? Best, |
html5 now it's work I have to create two children path first |
@rainstormza that's great! did you find also a solution for the mobile nav opening? |
@alexandru-paduraru of course but I still can't find a way to solve (click) function when resize to mobile and use that function in mobile nav I think you should find a way to move html tag , not re-generate it by jquery function |
@rainstormza can you please send a link to your app? |
You can also try to call this code on the resize event from Angular (don't know if this event exist) or you can try to call it from jQuery (it has the resize event) $toggle = $('.navbar-toggle');
$toggle.click(function (){
if(mobile_menu_visible == 1) {
$('html').removeClass('nav-open');
$('.close-layer').remove();
setTimeout(function(){
$toggle.removeClass('toggled');
}, 400);
mobile_menu_visible = 0;
} else {
setTimeout(function(){
$toggle.addClass('toggled');
}, 430);
main_panel_height = $('.main-panel')[0].scrollHeight;
$layer = $('<div class="close-layer"></div>');
$layer.css('height',main_panel_height + 'px');
$layer.appendTo(".main-panel");
setTimeout(function(){
$layer.addClass('visible');
}, 100);
$layer.click(function() {
$('html').removeClass('nav-open');
mobile_menu_visible = 0;
$layer.removeClass('visible');
setTimeout(function(){
$layer.remove();
$toggle.removeClass('toggled');
}, 400);
});
$('html').addClass('nav-open');
mobile_menu_visible = 1;
}
}); Hope this helps. |
It doesn't work in your "navbar.component.ts" create function like this test() { and in your "navbar.component.html" bind function like this
and resize chrome to mobile mode and try to click setting button it won't work like I said , we have to find the way that not use jQuery to re-generate those html |
I try to move navbar from main-panel "app.component" to component that I just create.
I create "admin component" and I want to use navbar for "admin component"
problem is .. when I resize for mobile and click toggle and click to another path in admin component
example : localhost/admin/test1 and clock to localhost/admin/test2
toggle didn't show close menu when I open it on the right side
I have to double click then toggle close happen and I can't click on the content to close sidebar for mobile
thanks for help :)
The text was updated successfully, but these errors were encountered: