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
74d85fc8
Verified
Commit
74d85fc8
authored
7 years ago
by
Lukas Maximilian Kimpel
Browse files
Options
Downloads
Patches
Plain Diff
Implement submit function to add or edit text content
parent
e9c6762e
1 merge request
!92
Resolve "content types (logic)"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/creator-text-content/creator-text-content.component.ts
+11
-5
11 additions, 5 deletions
...pp/creator-text-content/creator-text-content.component.ts
with
11 additions
and
5 deletions
src/app/creator-text-content/creator-text-content.component.ts
+
11
−
5
View file @
74d85fc8
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
TextContent
}
from
'
../text-content
'
;
import
{
TextContent
}
from
'
../text-content
'
;
import
{
ContentService
}
from
'
../content.service
'
;
@
Component
({
@
Component
({
selector
:
'
app-creator-text-content
'
,
selector
:
'
app-creator-text-content
'
,
...
@@ -10,19 +11,24 @@ export class CreatorTextContentComponent implements OnInit {
...
@@ -10,19 +11,24 @@ export class CreatorTextContentComponent implements OnInit {
content
:
TextContent
=
new
TextContent
(
'
1
'
,
content
:
TextContent
=
new
TextContent
(
'
1
'
,
'
1
'
,
'
1
'
,
'
1
'
,
'
0
'
,
'
Text Content 1
'
,
''
,
'
This is the body of Text Content 1
'
,
''
,
1
);
1
);
constructor
()
{
constructor
(
private
contentService
:
ContentService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
}
}
submitContent
()
{
submitContent
()
{
if
(
this
.
content
.
contentId
===
'
1
'
)
{
this
.
contentService
.
addContent
(
this
.
content
).
subscribe
();
}
else
{
// ToDo: Implement function in service
// this.contentService.updateContent(this.content).subscribe();
}
}
}
}
}
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