Skip to content

Commit cb7b898

Browse files
authored
Merge pull request #116 from huangqun/spigit-integration
Spigit integration - remove html tags
2 parents 57924a6 + 1fa46ee commit cb7b898

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/app/ideas/ideas-detail-dialog.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ <h2>Idea Information</h2>
1515
<div class="form-group">
1616
<label>Content</label>
1717
<div ng-bind-html="form.content" class="content"></div>
18-
<!--<div><textarea readonly="readonly">{{form.content}}</textarea></div>-->
1918
</div>
2019
<hr>
2120
<h2>Creator Information</h2>

src/app/ideas/ideas.detail.controller.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,28 @@ module.controller('IdeasDetailController', [
100100
$scope.createProject = function () {
101101
var project = {
102102
name: $scope.idea.title,
103-
description: $scope.idea.content
103+
description: angular.element('.content')[0].innerText
104104
};
105105
$scope.isLoading = true;
106106
ProjectService
107107
.createProject(project, $scope.user)
108108
.then(function (project) {
109109
ProjectService
110-
.addUserToProject(project.id, $scope.idea.creator_id)
111-
.then(function (data) {
112-
$alert.info("Project created.", $scope);
113-
})
114-
.catch(function (error) {
115-
$alert.error(error.error, $scope);
116-
}).finally(function(){
117-
$scope.isLoading = false;
118-
});
110+
.addUserToProject(project.id, $scope.idea.creator_id)
111+
.then(function (data) {
112+
$alert.info("Project created.", $scope);
113+
})
114+
.catch(function (error) {
115+
$alert.error(error.error, $scope);
116+
})
117+
. finally(function () {
118+
$scope.isLoading = false;
119+
});
119120
})
120121
.catch(function (error) {
121122
$alert.error(error.error, $scope);
122-
}).finally(function(){
123+
})
124+
. finally(function () {
123125
$scope.isLoading = false;
124126
});
125127
}

0 commit comments

Comments
 (0)