fixed spelling mistake, post button is now hidden when post is empty

master
Max 5 years ago
parent 93b99003a0
commit ce072d41b1

@ -8,7 +8,7 @@
</div> </div>
<div id="text1" style="text-align: center;"> <div id="text1" style="text-align: center;">
<h1>What's Greenvironment?</h1> <h1>What's Greenvironment?</h1>
<p class="mat-display-1">We, the greenviroment team want to create a netwok for environmentalists who care for our nature and our planet as much as we do.</p> <p class="mat-display-1">We, the greenviroment team want to create a network for environmentalists who care for our nature and our planet as much as we do.</p>
</div> </div>
<div id="text2" style="text-align: center;"> <div id="text2" style="text-align: center;">
<p class="mat-display-1">We believe, that together we can do amazing things to protect our environment and keep it clean and green.</p> <p class="mat-display-1">We believe, that together we can do amazing things to protect our environment and keep it clean and green.</p>

@ -7,7 +7,7 @@
<mat-card > <mat-card >
<mat-card-content> <mat-card-content>
<mat-form-field id="input"> <mat-form-field id="input">
<textarea matInput #content type="text" mat-autosize="true" matAutosizeMaxRows="3" placeholder="post something"></textarea> <textarea matInput #content type="text" [(ngModel)]="empty" mat-autosize="true" matAutosizeMaxRows="3" placeholder="post something"></textarea>
<button mat-button matSuffix mat-icon-button> <button mat-button matSuffix mat-icon-button>
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
</button> </button>
@ -24,7 +24,7 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<button mat-raised-button color="primary" id="post-button" (click)=createPost(content)> <button mat-raised-button *ngIf="empty" color="primary" id="post-button" (click)=createPost(content)>
POST POST
</button> </button>
</mat-card-content> </mat-card-content>

@ -12,6 +12,7 @@ import { User } from 'src/app/models/user';
}) })
export class FeedComponent implements OnInit { export class FeedComponent implements OnInit {
checked: boolean; // if the "I protected the environment."-box is checked checked: boolean; // if the "I protected the environment."-box is checked
empty: boolean;
// points value of the green action // points value of the green action
value: any; value: any;
viewNew = true; viewNew = true;

Loading…
Cancel
Save