Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
a7302a90
There was an error fetching the commit references. Please try again later.
Commit
a7302a90
authored
7 years ago
by
Hagen Dreßler
Browse files
Options
Downloads
Patches
Plain Diff
Edit service comment (add function addComment)
parent
7f5c6471
1 merge request
!54
Resolve "comment creation - creator component logic"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/comment.service.ts
+14
-1
14 additions, 1 deletion
src/app/comment.service.ts
with
14 additions
and
1 deletion
src/app/comment.service.ts
+
14
−
1
View file @
a7302a90
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
HttpClient
,
HttpHeaders
}
from
'
@angular/common/http
'
;
import
{
Observable
}
from
'
rxjs/Observable
'
;
const
httpOptions
=
{
headers
:
new
HttpHeaders
({
'
Content-Type
'
:
'
application/json
'
})
};
@
Injectable
()
@
Injectable
()
export
class
CommentService
{
export
class
CommentService
{
private
commentsUrl
=
'
api/comments
'
;
constructor
()
{
}
constructor
(
private
http
:
HttpClient
)
{
}
addComment
(
comment
:
Comment
):
Observable
<
Comment
>
{
return
this
.
http
.
post
<
Comment
>
(
this
.
commentsUrl
,
comment
,
httpOptions
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment