problem with angularjs #196

chenminhua opened this Issue Mar 20, 2016 · 1 comment


None yet

2 participants


I tried to use this plugin with angularjs.
But when I use "ng-if", this plugin does't work for me.
I guess it's not this plugin's problem. It's should be some wrong with ng-if.
I still can't mark it work.
please help me, thx.

HERE IS MY CODE SNIPPET. (in the controller's scope, we have a "login" variable to check if the user has logged in)

<body ng-app="app">
    <div ng-controller="NavigationCtrl">
        <div id="navigation" role="navigation" class="nav-collapse">
            <ul ng-if="login">
                <li><a href="/#/">HOME</a></li>
                <li><a href="/" ng-click="logOut()">LOGOUT</a></li>
                <li><a href="/#/snippet/create">CREATE</a></li>
                <li><a href=""> PROFIRE </a></li>
            <ul ng-if="!login">
                <li><a href="/#/user/signin">LOGIN</a></li>
                <li><a href="/#/user/register">REGISTER</a></li>
                <li><a href="">ABOUT</a></li>
        <div class="main" role="main">
            <a href="#nav" class="nav-toggle">MENU</a>
            <div ng-view></div>
    <script src="./public/responsive-nav.js-master/responsive-nav.js"></script>
    <script src="./public/bower_components/jquery/dist/jquery.min.js"></script>
        var navigation = responsiveNav("navigation",{customToggle: ".nav-toggle"})

hi there. i'm also interested in trying this so i read up on some instructions about this plugin. According to the instructions, it says to include

<script src="./public/responsive-nav.js-master/responsive-nav.js"></script>
<link rel="stylesheet" href="responsive-nav.css">

within the <head></head> tag. Is it possible this may be causing the issue with ng-if?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment