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

Fix add project issue. #303

Merged
merged 1 commit into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/front/src/app/main/main.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,13 @@ angular.module('topcoderX')
Tutorial.show(dialog, $scope);
}
}

//go to a new project page
$scope.goProject = function (project) {
if (project) {
$rootScope.project = project;
} else {
$rootScope.project = null;
}
$state.go('app.project');
};
}]);
2 changes: 1 addition & 1 deletion src/front/src/app/main/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h2>Dashboard</h2>
</div>
<div class="col-lg-2 with-button pull-right">
<button class="btn btn-sm btn-info pull-right pull-right-button" ui-sref="app.project">
<button class="btn btn-sm btn-info pull-right pull-right-button" ng-click="goProject()">
<i class="fa fa-plus"></i> Add Project</button>
</div>
</div>
Expand Down