Skip to content

Commit 5e12516

Browse files
authored
rr/fix/issues/#8-#9 (#10)
* rr/main-controller rr/main-controller * fix gulp indexHTML task * removing unecessary elements * main-controller base Approved-by: Roberto Robson Soares Nogueira <[email protected]> * Merged in rr/navigation-bar (pull request #3) rr/navigation-bar * navigation-bar directive * add navigation-bar app.js dependency. set tiny md override md-button-icon Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/side-menu (pull request #4) rr/side-menu Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/ng-route (pull request #5) rr/ng-route * rr/fix/ng-view (pull request #6) rr/fix/ng-view Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/view/home (pull request #7) rr/view/home Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/fix/issues/#1-#2 (pull request #8) rr/fix/issues/#1-#2 * view home, set navigation bar title * main-controller set view attribute when current path get changed Approved-by: Roberto Robson Soares Nogueira <[email protected]>
1 parent 1b10d9c commit 5e12516

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/directives/main-controller/main-controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// do NOT call it by yourself
3131
var setViewAttribute = function(){
3232

33-
$($element).attr(
33+
angular.element($element).attr(
3434
'view',
3535
path.getCurrentViewName()
3636
);

src/providers/path.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@
7272

7373
self.setCurrent = function(view){
7474
self.currentKey = view || 'home';
75-
// if(rootScope.mainController.setViewAttribute){
76-
// rootScope.mainController.setViewAttribute();
77-
// }
75+
rootScope.mainController.setViewAttribute();
7876
};
7977

8078
self.getPaths = function(){

src/views/home/home.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
'ViewHomeController',
1010

1111
function(
12-
path
12+
path,
13+
navigationBarFactory
1314
){
1415

1516
path.setCurrent('home');
1617

18+
navigationBarFactory.setTitle(path.getCurrent().label);
19+
1720
}
1821
);
1922

0 commit comments

Comments
 (0)