Skip to content

Commit 9bdfd99

Browse files
ion-input ohne ion-label
1 parent 07b1f7a commit 9bdfd99

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

src/app/hinzufuegen/hinzufuegen.page.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@
1414
</p>
1515

1616
<ion-item>
17-
<ion-label position="fixed">Abkürzung:</ion-label>
18-
<ion-input type="text" [(ngModel)]="abkuerzung"></ion-input>
17+
<ion-input label="Abkürzung" type="text" [(ngModel)]="abkuerzung"></ion-input>
1918
</ion-item>
2019

2120
<ion-item>
22-
<ion-label position="fixed">Bedeutung:</ion-label>
23-
<ion-input type="text" [(ngModel)]="bedeutung"></ion-input>
21+
<ion-input label="Bedeutung" type="text" [(ngModel)]="bedeutung"></ion-input>
2422
</ion-item>
2523

2624
&nbsp;
2725

2826
<ion-button expand="block" (click)="onHinzufuegenButton()" >Speichern</ion-button>
2927

30-
</ion-content>
28+
</ion-content>
29+

src/app/home/home.page.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ export class HomePage {
3434
*/
3535
public async onSuchenButton() {
3636

37-
if (this.abkuerzung === null || this.abkuerzung === undefined || this.abkuerzung.trim().length == 0 ) {
37+
if ( this.abkuerzung === null ||
38+
this.abkuerzung === undefined ||
39+
this.abkuerzung.trim().length == 0 ) {
3840

39-
this.dialogToastHelferService.zeigeDialog("Ungültige Eingabe", "Bitte zu suchende Abkürzung eingeben!");
41+
this.dialogToastHelferService.zeigeDialog( "Ungültige Eingabe",
42+
"Bitte zu suchende Abkürzung eingeben!" );
4043
return;
4144
}
4245

@@ -52,7 +55,7 @@ export class HomePage {
5255

5356
bedeutungenString += bedeutungenArray[i];
5457

55-
if (anzahl > 0 && i !== lastIndex) { bedeutungenString += ", "; }
58+
if (anzahl > 0 && i !== lastIndex) { bedeutungenString += "\n"; } // siehe CSS-Definition in global.scss
5659
}
5760

5861
const titel = `Ergebnis für "${this.abkuerzung}" (${anzahl}):`;

src/global.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@
3535
/* @import "@ionic/angular/css/palettes/dark.always.css"; */
3636
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
3737
@import "@ionic/angular/css/palettes/dark.system.css";
38+
39+
40+
/** mehrzeilige Ausgaben in Alerts **/
41+
ion-alert .alert-message {
42+
white-space: pre-line;
43+
}

0 commit comments

Comments
 (0)