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
00f79ea6
Commit
00f79ea6
authored
7 years ago
by
Hagen Dreßler
Browse files
Options
Downloads
Patches
Plain Diff
Add simple logic components (back, send, routing)
parent
5fe5f9aa
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/create-comment/create-comment.component.html
+4
-3
4 additions, 3 deletions
src/app/create-comment/create-comment.component.html
src/app/create-comment/create-comment.component.ts
+21
-3
21 additions, 3 deletions
src/app/create-comment/create-comment.component.ts
with
25 additions
and
6 deletions
src/app/create-comment/create-comment.component.html
+
4
−
3
View file @
00f79ea6
<form>
<form>
<mat-form-field
class=
"input-block"
>
<mat-form-field
class=
"input-block"
>
<input
matInput
type=
"text"
maxlength=
"24"
placeholder=
"Choose a title"
>
<input
matInput
#subject
type=
"text"
maxlength=
"24"
placeholder=
"Choose a title"
>
</mat-form-field>
</mat-form-field>
<mat-form-field
class=
"input-block"
>
<mat-form-field
class=
"input-block"
>
<input
matInput
#text
>
<textarea
matInput
placeholder=
"Add your comment"
></textarea>
<textarea
matInput
placeholder=
"Add your comment"
></textarea>
</mat-form-field>
</mat-form-field>
<button
mat-raised-button
color=
"primary"
>
Back
</button>
<button
mat-raised-button
color=
"primary"
(click)=
"goBack()"
>
Back
</button>
<button
mat-raised-button
color=
"primary"
>
Send
</button>
<button
mat-raised-button
color=
"primary"
(click)=
"send(subject.value, text.value)"
>
Send
</button>
</form>
</form>
This diff is collapsed.
Click to expand it.
src/app/create-comment/create-comment.component.ts
+
21
−
3
View file @
00f79ea6
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
Input
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
Room
}
from
'
../room
'
;
@
Component
({
@
Component
({
selector
:
'
app-create-comment
'
,
selector
:
'
app-create-comment
'
,
...
@@ -6,10 +10,24 @@ import { Component, OnInit } from '@angular/core';
...
@@ -6,10 +10,24 @@ import { Component, OnInit } from '@angular/core';
styleUrls
:
[
'
./create-comment.component.scss
'
]
styleUrls
:
[
'
./create-comment.component.scss
'
]
})
})
export
class
CreateCommentComponent
implements
OnInit
{
export
class
CreateCommentComponent
implements
OnInit
{
@
Input
()
room
:
Room
;
constructor
(
private
route
:
ActivatedRoute
,
private
location
:
Location
,
)
{
}
constructor
()
{
}
ngOnInit
():
void
{
this
.
getRoom
();
}
ngOnInit
()
{
getRoom
():
void
{
const
id
=
+
this
.
route
.
snapshot
.
paramMap
.
get
(
'
id
'
);
}
}
send
(
subject
:
string
,
text
:
string
):
void
{}
goBack
():
void
{
this
.
location
.
back
();
}
}
}
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