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
ea9db993
Commit
ea9db993
authored
7 years ago
by
Hagen Dreßler
Browse files
Options
Downloads
Patches
Plain Diff
Add navigate to component create-comment
parent
9e556bd0
1 merge request
!46
Resolve "comment creation - participant component logic"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/create-comment/create-comment.component.ts
+3
-0
3 additions, 0 deletions
src/app/create-comment/create-comment.component.ts
with
3 additions
and
0 deletions
src/app/create-comment/create-comment.component.ts
+
3
−
0
View file @
ea9db993
...
@@ -6,6 +6,7 @@ import { Comment } from '../comment';
...
@@ -6,6 +6,7 @@ import { Comment } from '../comment';
import
{
RoomService
}
from
'
../room.service
'
;
import
{
RoomService
}
from
'
../room.service
'
;
import
{
CommentService
}
from
'
../comment.service
'
;
import
{
CommentService
}
from
'
../comment.service
'
;
import
{
NotificationService
}
from
'
../notification.service
'
;
import
{
NotificationService
}
from
'
../notification.service
'
;
import
{
Router
}
from
'
@angular/router
'
;
@
Component
({
@
Component
({
selector
:
'
app-create-comment
'
,
selector
:
'
app-create-comment
'
,
...
@@ -16,6 +17,7 @@ export class CreateCommentComponent implements OnInit {
...
@@ -16,6 +17,7 @@ export class CreateCommentComponent implements OnInit {
@
Input
()
room
:
Room
;
@
Input
()
room
:
Room
;
constructor
(
constructor
(
private
router
:
Router
,
private
route
:
ActivatedRoute
,
private
route
:
ActivatedRoute
,
private
roomService
:
RoomService
,
private
roomService
:
RoomService
,
private
commentService
:
CommentService
,
private
commentService
:
CommentService
,
...
@@ -44,6 +46,7 @@ export class CreateCommentComponent implements OnInit {
...
@@ -44,6 +46,7 @@ export class CreateCommentComponent implements OnInit {
body
:
body
,
body
:
body
,
creationTimestamp
:
new
Date
(
Date
.
now
())
creationTimestamp
:
new
Date
(
Date
.
now
())
}
as
Comment
).
subscribe
(
room
=>
{
}
as
Comment
).
subscribe
(
room
=>
{
this
.
router
.
navigate
([
`room/
${
this
.
room
.
id
}
`
]);
this
.
notification
.
show
(
`Comment '
${
subject
}
' successfully created.`
);
this
.
notification
.
show
(
`Comment '
${
subject
}
' successfully created.`
);
});
});
}
}
...
...
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