angular-material

Several issues with angular formarray form such as input fields behaving inproperly , angular material not working

不羁岁月 提交于 2019-12-18 09:47:26
问题 I am using an angular formarray to store dynamic data in the database. But there are several issues with it such as input fields are taking only one digit at a time and angular material components not working on that page. The same code is working on other pages. If I remove formcontrolname from input fields, they are working fine. Any idea why this is happening? Thanks in advance Here is my code ts get vendor_mobile() { return this.purchaseform.get('vendor_mobile') } get product() { return

mat-table can't bind dataSource

本秂侑毒 提交于 2019-12-18 09:38:50
问题 I am trying to use angular material table MatTableModule , but when passing the data to the [dataSource] input I am getting the Can't bind to 'dataSource' since it isn't a known property of 'table'. error. I have already imported the MatTableModule and as pointed at GitHub issue #5577 also imported CdkTableModule but still no luck. Any ideas? 回答1: The problem was that the material angular version I'm using is v5.2.4, so the template should be <mat-table #table [dataSource]="dataSource"></mat

How to open mat-menu on a single click and close other opened menu if there is any?

时光怂恿深爱的人放手 提交于 2019-12-18 08:54:47
问题 I am stuck on this issue that when there a header multiple menu's and when i open a menu first time there is no issue but if there is already a menu opened and i click to open a second menu it doesn't work. it will first close the previously opened menu and then we have to click again to open the new menu. What i want is that when i click on a menu it should open in a single click and if there is any menu opened, it closes too. I haven't found any thing regarding this in angular2 material

Angular Material DatePicker Autocomplete

耗尽温柔 提交于 2019-12-18 07:11:21
问题 trying to implement a searchbar where you can search by the item's name or by a date. just wanted to know if there's a way to disable the datepicker autocomplete? problem is : - if i do a search by date, it's fine - if i do a search by name it's ok... untill i loose focus of search input, then it autocomplete with a date example : if i search an item with 1234 in it and loose focus of the search input, it will complete with 01/01/1234 and do the research with it... <mat-form-field id="search"

mat-error put to separate component not rendering properly

放肆的年华 提交于 2019-12-18 06:13:37
问题 I want to use mat-errors to render server-side errors in my Angular 5 SPA. This is what I've got so far, and it works <mat-form-field class="col-6"> <input matInput formControlName="firstName"> <mat-error [hidden]="!form.controls.firstName.hasError('required')">This field is required and cannot be empty</mat-error> <mat-error [hidden]="!form.controls.firstName.hasError('other')">Some other error</mat-error> </mat-form-field> Every field of the form looks similar. Input field and many mat

How to disable animation while opening dialog in angular material 2 with angular 4

我是研究僧i 提交于 2019-12-18 05:48:15
问题 I'm trying to create the dialog but problem is I want to disable the animation in the dialog so how to disable it. 回答1: In case you want to keep your animations on your app but being able to disable the one attached to a dialog you can override the dialog container by one you can control and disable all the animations inside that container. Override OverlayContainer component Create a custom OverlayContainer which extends the one from the cdk import { OverlayContainer } from '@angular/cdk

ERROR: @angular/material/material has no exported member 'MdButtonModule'

北战南征 提交于 2019-12-18 05:47:09
问题 Error below arose after upgrading from @angular/material 2.0.0-beta.11 to 2.0.0-beta.12 : Module @angular/material/material has no exported member 'MdButtonModule'. Typescript-code: import { MdButtonModule } from '@angular/material'; What happened? ERROR in c:/dev/my-proj/src/app/app-material/app-material.module.ts (4,3): Module '"c:/dev/my-proj/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'. ERROR in c:/dev/my-proj/src/app/app-material/app-material.module

Installing Angular Material, “Failed to instantiate module ngMaterial” even though I'm using angular version 1.3.0

落花浮王杯 提交于 2019-12-18 05:39:07
问题 This is very frustrating, Im using a mean.js yeoman generated application and can't get to seem to get angular-material up and running. I read another stackoverflow question about the issue Angularjs with material design Failed to instantiate module ngMaterial. So I updated my bower.json file and ran a bower update and bower install . It still doesnt work. During the bower update, bower gave me this message Unable to find a suitable version for angular, please choose one: , but I always chose

Installing Angular Material, “Failed to instantiate module ngMaterial” even though I'm using angular version 1.3.0

左心房为你撑大大i 提交于 2019-12-18 05:38:22
问题 This is very frustrating, Im using a mean.js yeoman generated application and can't get to seem to get angular-material up and running. I read another stackoverflow question about the issue Angularjs with material design Failed to instantiate module ngMaterial. So I updated my bower.json file and ran a bower update and bower install . It still doesnt work. During the bower update, bower gave me this message Unable to find a suitable version for angular, please choose one: , but I always chose

angular 2 material matTooltip multiline

限于喜欢 提交于 2019-12-18 04:38:12
问题 I'm new to Angular 2 Material. What's the preferred way to make a tool tip multi-line? For example, I might have the following tool tip: AA BBBBBBBBBB CCCC DDDDD And, I may want to to have it display in a multi-line format like this: AA BBBBBBBBBB CCCC DDDDD 回答1: First, create a class for your tooltip, to make it break lines on line breaks. .my-tooltip { white-space: pre-line; } Then, add the class to your tooltip and the line breaks with its code <span matTooltip="First line Second line"