Skip to content

Commit 24171aa

Browse files
committed
feat(app): implement navbar as directive
1 parent aee5983 commit 24171aa

13 files changed

+30
-12
lines changed

app/templates/client/app/account(auth)/login/login(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-include="'components/navbar/navbar.html'"></div>
1+
<navbar></navbar>
22

33
<div class="container">
44
<div class="row">

app/templates/client/app/account(auth)/login/login(jade).jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
div(ng-include='"components/navbar/navbar.html"')
1+
navbar
22
.container
33
.row
44
.col-sm-12

app/templates/client/app/account(auth)/settings/settings(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-include="'components/navbar/navbar.html'"></div>
1+
<navbar></navbar>
22

33
<div class="container">
44
<div class="row">

app/templates/client/app/account(auth)/settings/settings(jade).jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
div(ng-include='"components/navbar/navbar.html"')
1+
navbar
22
.container
33
.row
44
.col-sm-12

app/templates/client/app/account(auth)/signup/signup(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-include="'components/navbar/navbar.html'"></div>
1+
<navbar></navbar>
22

33
<div class="container">
44
<div class="row">

app/templates/client/app/account(auth)/signup/signup(jade).jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
div(ng-include='"components/navbar/navbar.html"')
1+
navbar
22
.container
33
.row
44
.col-sm-12

app/templates/client/app/admin(auth)/admin(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-include="'components/navbar/navbar.html'"></div>
1+
<navbar></navbar>
22

33
<div class="container">
44
<p>The delete user and user index api routes are restricted to users with the 'admin' role.</p>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
div(ng-include='"components/navbar/navbar.html"')
1+
navbar
22
.container
33
p
44
| The delete user and user index api routes are restricted to users with the 'admin' role.
@@ -8,4 +8,4 @@ div(ng-include='"components/navbar/navbar.html"')
88
br
99
span.text-muted {{user.email}}
1010
a.trash(ng-click='delete(user)')
11-
span.glyphicon.glyphicon-trash.pull-right
11+
span.glyphicon.glyphicon-trash.pull-right

app/templates/client/app/main/main(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-include="'components/navbar/navbar.html'"></div>
1+
<navbar></navbar>
22

33
<header class="hero-unit" id="banner">
44
<div class="container">

app/templates/client/app/main/main(jade).jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
div(ng-include='"components/navbar/navbar.html"')
1+
navbar
22

33
header#banner.hero-unit
44
.container
@@ -30,4 +30,4 @@ footer.footer
3030
= ' | '
3131
a(href='https://twitter.com/tyhenkel') @tyhenkel
3232
= ' | '
33-
a(href='https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open') Issues
33+
a(href='https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open') Issues
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict'
2+
3+
angular.module '<%= scriptAppName %>'
4+
.directive 'navbar', ->
5+
templateUrl: 'components/navbar/navbar.html'
6+
restrict: 'E'
7+
controller: 'NavbarCtrl'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
angular.module('<%= scriptAppName %>')
4+
.directive('navbar', function () {
5+
return {
6+
templateUrl: 'components/navbar/navbar.html',
7+
restrict: 'E',
8+
controller: 'NavbarCtrl'
9+
};
10+
});

test/test-file-creation.js

+1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ describe('angular-fullstack generator', function () {
174174
'client/assets/images/yeoman.png',
175175
'client/components/navbar/navbar.' + markup,
176176
'client/components/navbar/navbar.controller.' + script,
177+
'client/components/navbar/navbar.directive.' + script,
177178
'server/.jshintrc',
178179
'server/.jshintrc-spec',
179180
'server/app.js',

0 commit comments

Comments
 (0)