Angular component default style css display block

My pull-request has been merged. With the upcoming release of Angular CLI v9.1.0 a new option is going to be available: –displayBlock=true|false Docs: https://next.angular.io/cli/generate#component For the impatient: It’s available right now in v9.1.0-next.0 When using the CLI: ng generate component dashboard –displayBlock=true Settting a default value in angular.json: … “projectType”: “application”, “schematics”: { “@schematics/angular:component”: { … Read more

Angular5 – TypeError: Cannot read property ‘template’ of undefined

I forgot to define the header cell for the actions. So it was throwing that error. Here is the code which solved this problem. <ng-container matColumnDef=”actions”> <mat-header-cell *matHeaderCellDef></mat-header-cell> <mat-cell *matCellDef=”let row”> <button mat-button (click)=”showDetails(row)”>DETAILS</button> <button mat-button (click)=”editItem(row)”>EDIT</button> <button mat-button (click)=”deleteItem(row)”>DELETE</button> </mat-cell> </ng-container>

How to update / upgrade from Angular 4 to Angular 5+

This specific problem was fixed with Node version update. I had to update Node version, sudo apt-get install nodejs npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest ng new ProjectName node –version ==> 8.9.0 ng –version ==> 1.5.0 “dependencies”: { “@angular/animations”: “^5.0.0”, “@angular/common”: “^5.0.0”, “@angular/compiler”: “^5.0.0”, “@angular/core”: “^5.0.0”, “@angular/forms”: “^5.0.0”, “@angular/http”: “^5.0.0”, … Read more

How to set color of toggle buttons

matButtonToggle does not support the color property like matButton. You can use the css classes .mat-button-toggle and .mat-button-toggle-checked to style the different states. With material theming you can extract whichever individual palettes you need from the theme and apply the backgrounds default-contrast color to the text color to achieve optimal contrast with light or dark … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)