Commit c4134fa 1 parent 2516e38 commit c4134fa Copy full SHA for c4134fa
File tree 7 files changed +106
-1
lines changed
7 files changed +106
-1
lines changed Original file line number Diff line number Diff line change 19
19
20
20
// directives
21
21
'directives.mainController' ,
22
+ 'directives.navigation-bar'
22
23
23
24
// views
24
25
// 'views.home'
Original file line number Diff line number Diff line change 1
1
2
+ < navigation-bar flex ="none "> </ navigation-bar >
3
+
2
4
< div layout ="row " flex >
3
5
4
6
< md-content
Original file line number Diff line number Diff line change 9
9
'MainController' ,
10
10
11
11
function (
12
- $rootScope ,
13
12
$scope ,
14
13
$location ,
15
14
$element ,
Original file line number Diff line number Diff line change
1
+
2
+ 'use strict' ;
3
+
4
+ ( function ( ) {
5
+
6
+ angular . module ( 'factories.navigation-bar' , [ ] )
7
+
8
+ . factory ( 'navigationBarFactory' , function ( ) {
9
+
10
+ var title = 'nav bar title' ;
11
+
12
+ var getTitle = function ( ) {
13
+ return title ;
14
+ } ;
15
+
16
+ var setTitle = function ( newTitle ) {
17
+ title = newTitle ;
18
+ } ;
19
+
20
+ var factory = {
21
+
22
+ getTitle : getTitle ,
23
+ setTitle : setTitle
24
+
25
+ } ;
26
+
27
+ return factory ;
28
+ } ) ;
29
+
30
+ } ) ( ) ;
Original file line number Diff line number Diff line change
1
+ < md-toolbar >
2
+ < div class ="md-toolbar-tools ">
3
+
4
+ < md-button
5
+ ng-click ="toggleSideMenu($event) "
6
+ aria-label ="Menu "
7
+ md-ripple-size ="auto "
8
+ class ="md-icon-button "
9
+ xhide-gt-md
10
+ >
11
+ < md-icon md-svg-icon ="assets/icons/menu.svg "> </ md-icon >
12
+ </ md-button >
13
+
14
+ < h2 flex class ="md-toolbar-tools ">
15
+ {{navigationBarTitle()}}
16
+ </ h2 >
17
+
18
+ </ div >
19
+ </ md-toolbar >
20
+
21
+ < md-button
22
+ ng-show ="navigationBarService.fabButton "
23
+ ng-click ="navigationBarService.fabButton.func($event) "
24
+ class ="md-fab md-fab-bottom-right color2 "
25
+ aria-label ="Adicionar ">
26
+ < md-icon
27
+ class ="{{navigationBarService.fabButton.icon}} "
28
+ aria-hidden ="true ">
29
+ </ md-icon >
30
+ </ md-button >
Original file line number Diff line number Diff line change
1
+
2
+ 'use strict' ;
3
+
4
+ ( function ( ) {
5
+
6
+ angular . module ( 'directives.navigation-bar' , [
7
+ 'factories.navigation-bar'
8
+ ] )
9
+
10
+ . controller ( 'NavigationBarCtrl' ,
11
+
12
+ function (
13
+ $scope ,
14
+ navigationBarFactory
15
+ ) {
16
+
17
+ $scope . navigationBarTitle = navigationBarFactory . getTitle ;
18
+
19
+ $scope . toggleSideMenu = function ( ) {
20
+
21
+ console . log ( 'toggleSideMenu' ) ;
22
+
23
+ } ;
24
+
25
+ }
26
+ )
27
+
28
+ . directive ( 'navigationBar' , function ( ) {
29
+ return {
30
+ restrict : 'E' ,
31
+ templateUrl : 'navigation-bar/navigation-bar.html' ,
32
+ controller : 'NavigationBarCtrl' ,
33
+ } ;
34
+ } ) ;
35
+
36
+ } ) ( ) ;
Original file line number Diff line number Diff line change
1
+
2
+ a .md-icon-button ,
3
+ .md-icon-button {
4
+ svg {
5
+ fill : currentColor ;
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments