From 832681943124ebf8f90a0e5fcdba570149e4e769 Mon Sep 17 00:00:00 2001 From: Kageetai Date: Mon, 10 Nov 2014 11:46:03 +0000 Subject: [PATCH] fixed navbar not collapsing (https://github.com/DaftMonk/generator-angular-fullstack/issues/458) --- Gruntfile.js | 2 +- client/app/app.js | 7 +++++++ client/components/navbar/navbar.html | 2 +- client/index.html | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index e09a4ab..e660eef 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -223,7 +223,7 @@ module.exports = function (grunt) { target: { src: '<%= yeoman.client %>/index.html', ignorePath: '<%= yeoman.client %>/', - exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/', /bootstrap.css/, /font-awesome.css/ ] + exclude: [/bootstrap-sass-official/, '/json3/', '/es5-shim/', /bootstrap.css/, /font-awesome.css/ ] } }, diff --git a/client/app/app.js b/client/app/app.js index 571f070..be49b93 100644 --- a/client/app/app.js +++ b/client/app/app.js @@ -23,6 +23,13 @@ angular.module('jayMapApp', [ }); }]) + .directive('navbarCollapse', function () { + return function postLink(scope, element) { + var nav = element.find('.navbar-collapse'); + element.find('button.navbar-toggle').click(function() { nav.collapse('toggle'); }); + }; + }) + .factory('authInterceptor', function ($rootScope, $q, $cookieStore, $location) { return { // Add authorization token to headers diff --git a/client/components/navbar/navbar.html b/client/components/navbar/navbar.html index bd2ac49..36b8c30 100644 --- a/client/components/navbar/navbar.html +++ b/client/components/navbar/navbar.html @@ -1,4 +1,4 @@ -