Skip to content

Commit 70dc786

Browse files
committed
minor changes. erasing comments and extra lines
1 parent fa20a31 commit 70dc786

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/components/kata_list/kata_listCtrl.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
angular.module('app').controller('kata_listCtrl', function($scope, $state, mainService) {
23

34
$scope.getRandomKataList = (userid) => {

src/components/mainService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ angular.module('app').service('mainService', function($http, $q, $sce) {
88
// this.user = {id: 4, github_id: "20197415", name: "Steven", email: null, picture_url: "https://avatars.githubusercontent.com/u/20197415?v=3", username: "Steven-Nagie"};
99
this.user = {};
1010

11-
//this.currentKataId = {}
11+
1212

1313
// POST
1414
this.testExamples = (solution, examples) => {

src/components/profile/profileCtrl.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// each Ctrl should call - mainService.user - for access to the user object
21

32
angular.module('app').controller('profileCtrl', function($scope, $state, mainService) {
43

src/components/solutions/solutionsCtrl.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11

2-
// each Ctrl should call - mainService.user - for access to the user object
3-
42
angular.module('app').controller('solutionsCtrl', function($scope, $state, mainService) {
53

6-
// $scope.getKataById to be at the top of the page and the solutions will go below
4+
$scope.getKataById = (kataid) => {
5+
mainService.getKataById(kataid).then(response => {
6+
$scope.kataById = response.data;
7+
console.log($scope.katabyId);
8+
})
9+
}
710

811
$scope.getKataSolutions = (kataid) => {
912
mainService.getKataSolutions(kataid).then(response => {
@@ -13,6 +16,7 @@ angular.module('app').controller('solutionsCtrl', function($scope, $state, mainS
1316
}
1417

1518
$scope.init = () => {
19+
$scope.getKataById(1 /* replace 1 with kataid when set up */);
1620
$scope.getKataSolutions(1 /* replace 1 with kataid when set up */);
1721
}
1822

src/components/training/trainingCtrl.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/**********TRAINING CONTROLLER************/
22

3-
// each Ctrl should call - mainService.user - for access to the user object
4-
53
angular.module('app').controller('trainingCtrl', function($scope, $state, mainService) {
64

75
/** Create text areas **/

0 commit comments

Comments
 (0)