Skip to content
Snippets Groups Projects
Commit 3025e5d9 authored by Stefan Plociennik's avatar Stefan Plociennik
Browse files

add mat-expansion-panel to Dialog component; created some example tags with questions

parent 479b3c77
No related merge requests found
<mat-dialog-content>
<mat-accordion>
<mat-expansion-panel hideToggle>
<mat-expansion-panel-header>
<mat-panel-title>
{{keyword}}
</mat-panel-title>
<mat-panel-description>
This is a summary of the content
</mat-panel-description>
</mat-expansion-panel-header>
<p>This is the primary content of the panel.</p>
</mat-expansion-panel>
<mat-expansion-panel (opened)="panelOpenState = true"
(closed)="panelOpenState = false">
<mat-expansion-panel-header>
<mat-panel-title>
Self aware panel
</mat-panel-title>
<mat-panel-description>
Currently I am {{panelOpenState ? 'open' : 'closed'}}
</mat-panel-description>
</mat-expansion-panel-header>
<p>I'm visible because I am open</p>
</mat-expansion-panel>
<mat-expansion-panel
(opened)="panelOpenState = true"
(closed)="panelOpenState = false"
*ngFor="let elem of array">
<mat-expansion-panel-header>
<mat-panel-title>
{{elem.keyword}}
</mat-panel-title>
<mat-panel-description>
{{elem.correspondingQuestions.length}} Questions
</mat-panel-description>
</mat-expansion-panel-header>
<p *ngFor="let question of elem.correspondingQuestions">{{question}}</p>
</mat-expansion-panel>
</mat-accordion>
</mat-dialog-content>
// hide scrollbar
::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
//TODO: hide scrollbar for IE and Firefox
......@@ -7,13 +7,39 @@ import { Component, OnInit } from '@angular/core';
})
export class TopicCloudDialogComponent implements OnInit {
public panelOpenState: boolean;
public keywords: {
"Cloud",
"SWTP",
"Frage",
"Klausur"
};
public panelOpenState = false;
public array = [
{
"keyword": "Cloud",
"correspondingQuestions": [
"Wie genau ist die Cloud aufgebaut?",
"Wieviel speicherplatz steht mir in der Cloud zur verfuegung?",
"Sollen wir die Tag Cloud implementieren?"
]
},
{
"keyword": "SWT",
"correspondingQuestions": [
"Muss man fuer das Modul SWT bestanden haben?"
]
},
{
"keyword": "Frage",
"correspondingQuestions": [
"Das ist eine Lange Frage mit dem Thema 'frage'",
"Ich habe eine Frage, sind Fragen zum thema 'Frage' auch erlaubt?",
"Ich wollte Fragen ob sie gerne Sachen gefragt werden",
"Langsam geht mir die Fragerei mit den ganzen Fragen auf den Geist"
]
},
{
"keyword": "Klausur",
"correspondingQuestions": [
"Darf man in der Klausur hilfmittel verwenden?",
"An welchem Termin findet die Klausur statt?"
]
}
];
constructor() { }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment