Skip to content

Commit

Permalink
Merge pull request #64 from FrikkieSnyman/60-RoutingFunction
Browse files Browse the repository at this point in the history
Close #60
  • Loading branch information
HanrichPotgieter committed Jun 23, 2015
2 parents 8fdd857 + 10e8ccb commit bd4baac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
13 changes: 2 additions & 11 deletions www/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,8 @@ angular
})
.controller('mainCtrl', function($scope, $timeout, $mdSidenav, $mdDialog, $mdUtil, $log, $location) {
$scope.toggleLeft = buildToggler('left');
$scope.gotToMainPage = function() {
$location.path("/");
};
$scope.gotToProjectsPage = function() {
$location.path("/projects");
};
$scope.gotToEstimationPage = function() {
$location.path("/estimation");
};
$scope.goToProjectPage = function() {
$location.path('/createProject');
$scope.goTo = function(newPath) {
$location.path(newPath);
};
// $scope.toggleRight = buildToggler('right');

Expand Down
8 changes: 4 additions & 4 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ <h1><span>Estimate Swarm</span></h1>
</md-toolbar>
<md-content layout-padding="">
<md-list ng-controller="ListCtrl">
<md-list-item ng-click="gotToMainPage()">
<md-list-item ng-click="goTo('/')">
<md-icon md-svg-icon="img/icons/home.svg"></md-icon>
<p>Home</p>
</md-list-item>
<md-list-item ng-click="gotToProjectsPage()">
<md-list-item ng-click="goTo('/projects')">
<md-icon md-svg-icon="img/icons/project.svg"></md-icon>
<p>Projects</p>
</md-list-item>
<md-list-item ng-click="gotToEstimationPage()">
<md-list-item ng-click="goTo('/estimation')">
<md-icon md-svg-icon="img/icons/project.svg"></md-icon>
<p>Estimation</p>
</md-list-item>
Expand All @@ -51,7 +51,7 @@ <h2>
<span>{{getPath()}}</span>
</h2>
<span flex=""></span>
<md-button class="md-fab" style="positon: absolute; left: -25pt; top: 23pt" aria-label="Go to project page" ng-click="goToProjectPage()">
<md-button class="md-fab" style="positon: absolute; left: -25pt; top: 23pt" aria-label="Go to project page" ng-click="goTo('/createProject')">
<md-icon md-svg-src="img/icons/add.svg"></md-icon>
</md-button>
</div>
Expand Down

0 comments on commit bd4baac

Please sign in to comment.