angular-material

Angular material doesn't work with adminlte UI that attached with ABP 5.6.0

房东的猫 提交于 2020-07-10 07:29:15
问题 Why angular material does not work with adminlte template I've imported all angular material component by app.module.ts but when I use mat-select it didn't work the design totally crashed such as below Screenshot : My code is identical to this another screen shoot 来源: https://stackoverflow.com/questions/62433895/angular-material-doesnt-work-with-adminlte-ui-that-attached-with-abp-5-6-0

MatTableDataSource : cannot read property 'length' of undefined

六眼飞鱼酱① 提交于 2020-07-09 15:53:27
问题 Im getting following error while using angular material data table. i am able to get the data from api but cannot render it in view. Error: error Image TS: dataSource = new MatTableDataSource(); displayedColumns: string[] = ["Part#", "Description"]; getSearchResult() { let params = { ParentCategoryID: 0, CategoryID: 0, ManufacturerID: 0, }; this._httpService.getSearchResult(params).subscribe((resp: any) => { this.searchResult = resp; this.dataSource.data = this.searchResult; }); } View:

How to select an option with Angular Material 2 and Protractor?

你。 提交于 2020-07-09 12:57:49
问题 I'm writing some e2e tests with protractor. My application is an Angular Material 2 application. In my test I want to select an option of a md-select by value. When I inspect the open md-select I see the md-option items. The values of the options are in an attribute ng-reflect-value. Let's say I have an option with the value "optionA". How can I select a certain option by this value? I tried this: element(by.name('myselect')).click(); $$('.mat-option').then((options) => { ... }); and inside

How to fix position of mat-select-panel in Angular Material

a 夏天 提交于 2020-07-09 07:08:22
问题 I have a project in which I use Angular Material Components and I would like to customize mat-select. I want to achieve select input which mat-select-panel looks like it's dropdown as in native html select. I accomplished good effect using only CSS styles but I have one problem. The problem is that my mat-select looks different depending on the size of the browser window. More specifically, mat-form-field and mat-select-panel sometimes are not aligned (there left sides are not in line) and

How to include material icon library in angular?

青春壹個敷衍的年華 提交于 2020-07-08 15:39:08
问题 (i refer this link for that https://github.com/angular/angular-cli/issues/2662), I add CSS in angular.json and import library instyle.css (it gives an error like ./src/styles.css (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./src/styles.css)), what is the proper way to install material icon library in the local project in angular? npm install material-design-icons-iconfont --save angular.json "styles": [ "src/styles.css", "../node_modules/material-design-icons

How to set autofocus on a matInput element on click event in Angular 6?

℡╲_俬逩灬. 提交于 2020-07-08 11:53:24
问题 Similar to Google Login page, I want to have autofocus on input element after on click event. I have tried @ViewChild('id') and document.getElementId('id'). Both of it doesn't work. It's always null or undefined. How can I achieve this? <mat-form-field class="example-full-width col-sm-4"> <input autofocus id="login-username" matInput formControlName="userName" minlength="5" maxlength="20" name="userName" placeholder="Username" required #input> </mat-form-field> <div class="col-sm-12"> <button

How to set autofocus on a matInput element on click event in Angular 6?

走远了吗. 提交于 2020-07-08 11:53:22
问题 Similar to Google Login page, I want to have autofocus on input element after on click event. I have tried @ViewChild('id') and document.getElementId('id'). Both of it doesn't work. It's always null or undefined. How can I achieve this? <mat-form-field class="example-full-width col-sm-4"> <input autofocus id="login-username" matInput formControlName="userName" minlength="5" maxlength="20" name="userName" placeholder="Username" required #input> </mat-form-field> <div class="col-sm-12"> <button

Angular Material data table column sort by date range

瘦欲@ 提交于 2020-07-07 08:18:38
问题 How to sort a date column based on the date range? Angular material data table. I am working a project now facing a problem on how to date column sort data based on the date range fromDate and toDate using with filterPredicate or any other option in mat-table. The date column will be shown in between date range. Please refer screenshot and look at the project in stackblitz here https://stackblitz.com/edit/angular-pkkvbd-cdtxwz-date-range-filter?embed=1&file=app/table-filtering-example.ts If I

Angular Material data table column sort by date range

生来就可爱ヽ(ⅴ<●) 提交于 2020-07-07 08:17:29
问题 How to sort a date column based on the date range? Angular material data table. I am working a project now facing a problem on how to date column sort data based on the date range fromDate and toDate using with filterPredicate or any other option in mat-table. The date column will be shown in between date range. Please refer screenshot and look at the project in stackblitz here https://stackblitz.com/edit/angular-pkkvbd-cdtxwz-date-range-filter?embed=1&file=app/table-filtering-example.ts If I

Angular Material Stepper causes mat-formfield to validate for dynamic forms when returning to an older step

半腔热情 提交于 2020-07-06 09:18:17
问题 A problem is occurring with the angular materials mat-stepper when working with dynamic forms. For example I have a stepper with 3 steps each having there own form. The first step however uses a hidden form to determine if it is valid or not as this step can dynamically add more forms so binding all of them to the step is impossible. When you are on the first step you can create multiple forms and everything works as expected without any random validation occurring to the new forms added. The