Skip to content

Commit 9ff7545

Browse files
author
Jon Myrick
authored
Merge pull request CodewarsClone#16 from CodewarsClone/stringify
Stringify
2 parents fd841ce + 4c49dc4 commit 9ff7545

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<section class="training-main">
22

33
<div class="training-body">
4-
<p>Input code here</p>
4+
5+
<p>Solution</p>
56
<form>
67
Function: <textarea name="solution" cols="40" rows="5" id="solution-input" ng-model="solutionInput"></textarea>
78
<button ng-click="sendSolution(solutionInput)">Submit</button>
89
</form>
9-
<p>This is text</p>
1010
</div>
1111

1212
</section>

src/components/training/training.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66

77
.training-body {
88
background-color: red;
9-
height: 50vh;
10-
width: 50vw;
119
}

src/components/training/trainingCtrl.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
angular.module('app').controller('trainingCtrl', function($scope, $state, mainService) {
44

55
$scope.sendSolution = function(input) {
6-
// mainService.getTest(input).then((response) => console.log(response));
7-
input = JSON.stringify(input);
8-
input = input.replace("\n", " ");
6+
input = input.replace(/\n/g, " ");
97
console.log(input);
8+
// mainService.getTest(input).then((response) => console.log(response));
109
}
1110

1211

0 commit comments

Comments
 (0)