angular-material

Remove padding from fxLayoutGap last element of row

不羁岁月 提交于 2019-12-20 03:15:40
问题 I have a problem using fxLayoutGap. The last column of my list has a padding and I don't want it. How to keep fxLayoutGap (space between cards) and remove the padding from the last column ? Thank ! <div fxFlexFill fxLayout="row wrap" fxLayout.xs="column" fxLayout.sm="column" fxLayoutGap="20px grid" style="margin-right:-20px;"> <div fxHide.lt-sm="true" fxFlex="calc(25%-20px)" fxFlex.md="33"> <div fxFlexFill fxLayoutAlign="center center"> <mat-card (click)="addAdvert()" class="mat-card-add

TypeError: Object(…) is not a function for angular-material

夙愿已清 提交于 2019-12-20 02:42:11
问题 In angular 7, trying to use angular material mat-dialog-content. While importing in app.module.ts it gives the following error: TypeError: Object(...) is not a function like: Uncaught TypeError: Object(...) is not a function at platform.es5.js:102. package.json { "name": "image-cropp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^7.2.15

TypeError: Object(…) is not a function for angular-material

南楼画角 提交于 2019-12-20 02:42:03
问题 In angular 7, trying to use angular material mat-dialog-content. While importing in app.module.ts it gives the following error: TypeError: Object(...) is not a function like: Uncaught TypeError: Object(...) is not a function at platform.es5.js:102. package.json { "name": "image-cropp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^7.2.15

Angular Material - MdInput to MatInputModule?

ぐ巨炮叔叔 提交于 2019-12-20 02:35:38
问题 What I'm Using Angular Angular Material ^2.0.0-beta.12 What I'm doing I just started a new project and installed material When copying some syntax from a previous project, I get an error when trying to import 'import { MdInputModule} from '@angular/material'; After digging through the typings, it looks as though it's now changed to 'MatInputModule' I've updated my module to use 'MatInputModule' Now the HTML throws an error 'md-form-field' is not a known element: This is using the syntax

How to get checkbox data in angular material

五迷三道 提交于 2019-12-20 01:40:03
问题 I want to get the all checkboxes items when user selects, now am getting the data But the problem is that the checkbox don't change, I mean that when I click the checkbox, if the initial state is checked, always remain checked and vice versa. this.settings_data = ["one", "two", "three", "four", "five"]; <div class="settings_head" fxFlex="50" *ngFor="let item of settings_data"> <mat-checkbox formControlName="settingsCheckboxvalues" (ngModelChange)="seleteditems($event,item)">{{item}}</mat

Angular Material mdTabs - how to get only the effect of tabs animation not the content?

不羁的心 提交于 2019-12-19 19:47:21
问题 I want to get the animation effect of when someone clicks on the tab and the border below that tab slides to right with the button having a nice ripple effect. I don't want to use the content inside the tab, I just want the tab effect. As you can see, clicking on the second tab will make the border slide to the right but content will also move to left. I only want tab button sliding to the right as part of my effect. How can I achieve this? 回答1: You can use the md-tabs directive without the

Angular Material component not working: 'mat-option' is not a known element

时光总嘲笑我的痴心妄想 提交于 2019-12-19 17:45:00
问题 I am trying to add angular material component. but the component did not work properly. that error said Uncaught Error: Template parse errors: 'mat-option' is not a known element: // ... I think the error comes from app.module.ts : import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { SidebarComponent } from './sidebar/sidebar

angular material md-datepicker inside bootstrap modal

对着背影说爱祢 提交于 2019-12-19 14:22:35
问题 I am tring to use Angular material md-datepicker inside a Bootstrap modal but, on clicking the date the modal popup hides. How can i solve that problem? <div class="modal fade " tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close forVideoStop" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Introduction video for body

text color of all required input field change to invalid color when adding a dynamic formControl

好久不见. 提交于 2019-12-19 12:43:19
问题 Whenever I add a dynamic formControl via button click, all input fields that are required change color to invalid (red), my expectation is that only when the input is "touched" then form field will change to invalid color and only on the specific not all. I dont have a clue why this happen. I am just new to angular and angular material. Also i have pasted the whole html file. Also this is my working example https://stackblitz.com/edit/angular-emman-sample?embed=1&file=src/app/app.component

How to dynamically define formControl name within ngFor loop?

倖福魔咒の 提交于 2019-12-19 10:19:10
问题 I would like to dynamically populate fields based on the items containing within an object. I'm using reactive forms with angular material. However, I'm getting: Error: Cannot find control with unspecified name attribute <div *ngFor="let field of guidelines.fields; let i=index"> <mat-form-field> <input [formControl]="i" ngDefaultControl matInput placeholder={{field.field_name}} value={{field.notes}}> </mat-form-field> </div> 回答1: Using form group: HTML <div [formGroup]="form" class="edit