angular-material-6

angular material 6 multiple mat-sliders with different colors

大憨熊 提交于 2021-02-10 18:10:29
问题 i have 3 'mat-slider's in a page and i want to have 3 different colors for the sliders. i cant override the theme colors for the page(component) as it will apply to all the sliders. do i have to make 3 different components for the sliders and override theme colors in each? what is the easiest way to achieve this? below are my angular and package versions, Angular CLI: 6.0.8 Node: 8.9.4 OS: win32 x64 Angular: 6.0.6 ... animations, common, compiler, compiler-cli, core, forms ... http, language

Angular Material custom datepicker format throws error “format.replace is not a function”

这一生的挚爱 提交于 2021-02-10 14:23:07
问题 I am working on customising the date to the dd-mmm-yyy ie for eg 12-Feb-2019, working using the angular material 6 and this is my code, I have not used a replace function but yet get this error The component file content import { MomentDateAdapter ,MatMomentDateModule } from '@angular/material-moment-adapter'; import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core'; import {MatDatepicker} from '@angular/material/datepicker'; import {default as _rollupMoment,

No provider for ControlContainer Error while using Angular Material Forms with Angular 6

十年热恋 提交于 2021-01-29 03:57:19
问题 I have already written an application using Angular 6 and I am adding Angular material into it. Reactive forms approach is used in existing application I have a login module which has below declaration. @NgModule({ imports: [ CommonModule, RouterModule.forChild([ {path:'login',component:LoginComponent} ]), ReactiveFormsModule, HttpClientModule, MatFormFieldModule, MatInputModule ], declarations: [LoginComponent] }) export class LoginModule { } The Login component has below template - login

How to do filter in angular material data table for specific column

非 Y 不嫁゛ 提交于 2021-01-01 17:50:38
问题 i am trying angular material data table. As we know filtering happened for each row by default. If i want to filter column specific, then what should i do? Should i have to write method for getting all records, then iterate over it and compare specific column? component.ts ngOnInit() { this.service.getUser().subscribe( results => { if(!results){ return; } console.log(results); this.dataSource = new MatTableDataSource(results); this.dataSource.sort = this.sort; }) onSearchClear(){ this

How to do filter in angular material data table for specific column

回眸只為那壹抹淺笑 提交于 2021-01-01 17:49:54
问题 i am trying angular material data table. As we know filtering happened for each row by default. If i want to filter column specific, then what should i do? Should i have to write method for getting all records, then iterate over it and compare specific column? component.ts ngOnInit() { this.service.getUser().subscribe( results => { if(!results){ return; } console.log(results); this.dataSource = new MatTableDataSource(results); this.dataSource.sort = this.sort; }) onSearchClear(){ this

How to do filter in angular material data table for specific column

心已入冬 提交于 2021-01-01 17:47:21
问题 i am trying angular material data table. As we know filtering happened for each row by default. If i want to filter column specific, then what should i do? Should i have to write method for getting all records, then iterate over it and compare specific column? component.ts ngOnInit() { this.service.getUser().subscribe( results => { if(!results){ return; } console.log(results); this.dataSource = new MatTableDataSource(results); this.dataSource.sort = this.sort; }) onSearchClear(){ this

How to do filter in angular material data table for specific column

爷,独闯天下 提交于 2021-01-01 17:46:18
问题 i am trying angular material data table. As we know filtering happened for each row by default. If i want to filter column specific, then what should i do? Should i have to write method for getting all records, then iterate over it and compare specific column? component.ts ngOnInit() { this.service.getUser().subscribe( results => { if(!results){ return; } console.log(results); this.dataSource = new MatTableDataSource(results); this.dataSource.sort = this.sort; }) onSearchClear(){ this

Angular mat-table pagination not working, entire data is loaded on First page of mat-table

半城伤御伤魂 提交于 2020-12-11 02:36:06
问题 I have use Angular Material table, i have bind data source from ts file,but all the data is loaded on very first page, pagination is not working.I have two more table, which are on same page,same problem for other tables too. I have tried setTimeout(() => this.dataSource.paginator = this.paginator); and ngAfterViewInit() { this.dataSource.paginator = this.paginator } HTML: <mat-table class="mt-4 table-container" fxFlex="100" [dataSource]="allUsers"> <ng-container matColumnDef="checked"> <mat

Can't override the angular material theme with my css properties

情到浓时终转凉″ 提交于 2020-08-07 05:26:10
问题 I am using Angular 6.0.8 with Angular Material theme version 6.4.0 Whenever I try to slightly modify the material theme, it never works, as I always find the material theme properties to overwrite my CSS properties as follows: currentColor .mat-input-element (material theme) initial input, textarea, select, button (user agent stylesheet) #1072BA .English #1072BA .English #1072BA body Only the first property is applied (the rest are striked through) I have tried multiple variations to solve