- myProject - location path fixed

This commit is contained in:
Matan Bar Yosef 2015-06-29 20:28:20 +03:00
parent 55fb0cbc0d
commit 8aae6ab869
2 changed files with 3 additions and 11 deletions

View file

@ -25,19 +25,11 @@ angular.module('SeHub')
{ {
console.log("Error: " + err.message); console.log("Error: " + err.message);
}); });
} }
$scope.goToProject = function(projectId) $scope.goToProject = function(projectId)
{ {
for (var i = 0; i < $scope.myProjects; i++) $location.path('/project/' + projectId);
{
if($scope.myProjects.id === projectId)
{
console.log("project ID: " + projectId)
$location.path('/project/' + projectId);
}
};
} }
var init = function() var init = function()

View file

@ -13,7 +13,7 @@
<div ng-if="t.length != 1"> <div ng-if="t.length != 1">
<md-button ng-click="goToProject(project.id)" style="width:100%; height:32%;" layout-padding class = "md-raised"> <md-button ng-click="goToProject(project.id)" style="width:100%; height:32%;" layout-padding class = "md-raised">
<md-card-content> <md-card-content>
<h2 class="md-title">{{project.projectName}}</h2> {{project.projectName}}
<div layout-align="center center" style=" width:70%;"> <div layout-align="center center" style=" width:70%;">
<canvas layout-padding layout-margin id="project.projectName" class="chart chart-bar" data="project.info.stats.macro.data" labels="project.info.stats.macro.labels"></canvas> <canvas layout-padding layout-margin id="project.projectName" class="chart chart-bar" data="project.info.stats.macro.data" labels="project.info.stats.macro.labels"></canvas>
</div> </div>
@ -24,7 +24,7 @@
<md-button ng-click = "goToProject(project.id)" style="width:32%; height:32%;" layout-padding class = "md-raised"> <md-button ng-click = "goToProject(project.id)" style="width:32%; height:32%;" layout-padding class = "md-raised">
<md-card style="width:97%;height:97%"> <md-card style="width:97%;height:97%">
<md-card-content> <md-card-content>
<h2 class="md-title">{{project.projectName}}</h2> {{project.projectName}}
<canvas layout-padding layout-margin id="project.projectName" class="chart chart-bar" data="project.info.stats.macro.data" <canvas layout-padding layout-margin id="project.projectName" class="chart chart-bar" data="project.info.stats.macro.data"
labels="project.info.stats.macro.labels"></canvas> labels="project.info.stats.macro.labels"></canvas>
</md-card-content> </md-card-content>