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
048b16f4
There was a problem fetching the latest pipeline status.
Commit
048b16f4
authored
7 years ago
by
Heinrich Marks
🌺
Browse files
Options
Downloads
Patches
Plain Diff
Adjust logic to show respective content list items only now
parent
caf9f000
1 merge request
!78
Resolve "Content List Filter for Items"
Pipeline
#13327
passed with stage
in 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/content-list/content-list.component.ts
+19
-4
19 additions, 4 deletions
src/app/content-list/content-list.component.ts
src/app/content.service.ts
+3
-2
3 additions, 2 deletions
src/app/content.service.ts
with
22 additions
and
6 deletions
src/app/content-list/content-list.component.ts
+
19
−
4
View file @
048b16f4
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
ContentService
}
from
'
../content.service
'
;
import
{
Content
}
from
'
../content
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
RoomService
}
from
'
../room.service
'
;
@
Component
({
selector
:
'
app-content-list
'
,
...
...
@@ -10,14 +12,27 @@ import { Content } from '../content';
export
class
ContentListComponent
implements
OnInit
{
contents
:
Content
[];
constructor
(
private
contentService
:
ContentService
)
{
}
constructor
(
private
contentService
:
ContentService
,
private
route
:
ActivatedRoute
,
private
roomService
:
RoomService
,
)
{
}
ngOnInit
()
{
this
.
getContents
();
this
.
route
.
params
.
subscribe
(
params
=>
{
this
.
getRoom
(
params
[
'
roomId
'
]);
});
}
getRoom
(
id
:
string
):
void
{
this
.
roomService
.
getRoom
(
id
).
subscribe
(
params
=>
{
this
.
getContents
(
params
[
'
id
'
]);
});
}
getContents
():
void
{
this
.
contentService
.
getContents
()
getContents
(
roomId
:
string
):
void
{
this
.
contentService
.
getContents
(
roomId
)
.
subscribe
(
contents
=>
{
this
.
contents
=
contents
;
});
...
...
This diff is collapsed.
Click to expand it.
src/app/content.service.ts
+
3
−
2
View file @
048b16f4
...
...
@@ -16,8 +16,9 @@ export class ContentService extends ErrorHandlingService {
super
();
}
getContents
():
Observable
<
Content
[]
>
{
return
this
.
http
.
get
<
Content
[]
>
(
this
.
contentUrl
).
pipe
(
getContents
(
roomId
:
string
):
Observable
<
Content
[]
>
{
const
url
=
`
${
this
.
contentUrl
}
/?roomId=
${
roomId
}
`
;
return
this
.
http
.
get
<
Content
[]
>
(
url
).
pipe
(
catchError
(
this
.
handleError
(
'
getContents
'
,
[]))
);
}
...
...
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