Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frag.jetzt SWTP 2022
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Marc Tröll
frag.jetzt SWTP 2022
Commits
13d2ce3a
Commit
13d2ce3a
authored
7 years ago
by
Hagen Dreßler
Browse files
Options
Downloads
Patches
Plain Diff
Edit logic components of comment
parent
3e1e2946
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/comment/comment.component.ts
+29
-2
29 additions, 2 deletions
src/app/comment/comment.component.ts
src/app/create-comment/create-comment.component.ts
+1
-2
1 addition, 2 deletions
src/app/create-comment/create-comment.component.ts
with
30 additions
and
4 deletions
src/app/comment/comment.component.ts
+
29
−
2
View file @
13d2ce3a
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
OnInit
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
Comment
}
from
'
../comment
'
;
import
{
CommentService
}
from
'
../comment.service
'
;
import
{
RoomService
}
from
'
../room.service
'
;
@
Component
({
selector
:
'
app-comment
'
,
...
...
@@ -9,9 +13,32 @@ import { Comment } from '../comment';
export
class
CommentComponent
implements
OnInit
{
comments
:
Comment
[];
constructor
()
{
}
constructor
(
private
route
:
ActivatedRoute
,
private
roomService
:
RoomService
,
private
location
:
Location
,
private
commentService
:
CommentService
)
{
}
ngOnInit
()
{
this
.
route
.
params
.
subscribe
(
params
=>
{
this
.
getRoom
(
params
[
'
roomId
'
]);
});
}
getRoom
(
id
:
string
):
void
{
this
.
roomService
.
getRoom
(
id
).
subscribe
(
params
=>
{
this
.
getComments
(
params
[
'
id
'
]);
}
);
}
getComments
(
roomId
:
string
):
void
{
this
.
commentService
.
getComments
(
roomId
)
.
subscribe
(
comments
=>
this
.
comments
=
comments
);
}
goBack
():
void
{
this
.
location
.
back
();
}
}
This diff is collapsed.
Click to expand it.
src/app/create-comment/create-comment.component.ts
+
1
−
2
View file @
13d2ce3a
import
{
Component
,
OnInit
,
Input
,
Inject
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
Input
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
Room
}
from
'
../room
'
;
...
...
@@ -6,7 +6,6 @@ import { Comment } from '../comment';
import
{
RoomService
}
from
'
../room.service
'
;
import
{
CommentService
}
from
'
../comment.service
'
;
import
{
NotificationService
}
from
'
../notification.service
'
;
import
{
MAT_DIALOG_DATA
,
MatDialogRef
}
from
'
@angular/material
'
;
@
Component
({
selector
:
'
app-create-comment
'
,
...
...
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