@@ -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