Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit b165d06

Browse files
committed
Fix add project issue.
1 parent 3fb3969 commit b165d06

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/front/src/app/main/main.controller.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,5 +184,13 @@ angular.module('topcoderX')
184184
Tutorial.show(dialog, $scope);
185185
}
186186
}
187-
187+
//go to a new project page
188+
$scope.goProject = function (project) {
189+
if (project) {
190+
$rootScope.project = project;
191+
} else {
192+
$rootScope.project = null;
193+
}
194+
$state.go('app.project');
195+
};
188196
}]);

src/front/src/app/main/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h2>Dashboard</h2>
44
</div>
55
<div class="col-lg-2 with-button pull-right">
6-
<button class="btn btn-sm btn-info pull-right pull-right-button" ui-sref="app.project">
6+
<button class="btn btn-sm btn-info pull-right pull-right-button" ng-click="goProject()">
77
<i class="fa fa-plus"></i> Add Project</button>
88
</div>
99
</div>

0 commit comments

Comments
 (0)