angularjs - Using Responsive-nav.js with Angular -


utilizing responsive-nav.js attempting create responsive navigation. i've used responsive-nav.js on non-angular projects in past without issue. having difficult figuring out how include required code. example, attempted place line of code in index.html file before closing body tag instructed on in documentation.

<!-- put right before </body> closing tag --> <script>   var nav = responsivenav(".nav-collapse"); </script> 

the script above console gives me error "responsivena not defined".

i created directive responsive-nav.js did not resolve problem.

.directive('responsivenav', function(){     return{         restrict: 'e',          link:function(scope, element, attrs){              $(element).responsivenav("foo",{                 customtoggle  : "nav-toggle",                 navclass      : "nav-collapse"               });                     scope.$apply();         }     } }); 


Popular posts from this blog