angular-material

Angular drag and drop not working when dropping elements in n-ary tree represented using recursive template

我与影子孤独终老i 提交于 2020-03-25 20:05:34
问题 I'm new to angular material drag and drop. My app is using an n-ary tree, and since I don't know its form apriori, I've been forced to use a recursive template in order to represent it. The last couple of days I've been trying to use Angular material drag and drop to reorder siblings. If I remove the root node everything works just fine, but I cannot remove the root node since I need it to traverse the tree for other operations. Bellow is a simplified form of the tree. In reality, the tree

Why my submit button change his colour when its disabled because I selected other radio button in Angular 9

一世执手 提交于 2020-03-25 18:40:23
问题 The problem I have right now is that I have my login and has two radio buttons one is selected for default until now its all fine, the submit button looks disabled but in the moment i click the other radio button the colour of the submit button change to the colour that it should have when is available. Even when the colour of the button change you cant send the information until you put the correct data. How can I solve this problem? . I'm using angular material , ng-bootstrap and scss .

How to filter data with mattableDataSource?

随声附和 提交于 2020-03-25 18:38:59
问题 I have some data and I have some types. And for every type you have different data. SO my template looks like this: <mat-tab-group (selectedTabChange)="onTabChange($event)" [selectedIndex]="selectedTab" (selectedIndexChange)="setTabState($event)" > <mat-tab [label]="tab.name" *ngFor= "let tab of tabs" > <div class="mat-elevation-z8 table-container"> <table *ngIf = "tab.dataSource && tab.dataSource.data" mat-table [dataSource]="tab.dataSource" matSort aria-label="Elements"> <ng-container

Angular Material DatePicker: Month and Day Picker with Selector

ぃ、小莉子 提交于 2020-03-25 13:50:12
问题 The following datepicker, has only Month and Day, with no year as intended. However, it does not have a Month selector as the picture below. How do I fix to allow a Month Picker, with no year? Trying to modify code from the question below . Angular Material DatePicker: Month and Day, Exclude Year https://stackblitz.com/edit/angular-hw54xf It probably needs to be injected in the periodLabel row below. <div class="example-header"> <button mat-icon-button (click)="previousClicked('month')"> <mat

Angular Material DatePicker: Month and Day Picker with Selector

我只是一个虾纸丫 提交于 2020-03-25 13:49:56
问题 The following datepicker, has only Month and Day, with no year as intended. However, it does not have a Month selector as the picture below. How do I fix to allow a Month Picker, with no year? Trying to modify code from the question below . Angular Material DatePicker: Month and Day, Exclude Year https://stackblitz.com/edit/angular-hw54xf It probably needs to be injected in the periodLabel row below. <div class="example-header"> <button mat-icon-button (click)="previousClicked('month')"> <mat

Two datepickers on angular material with different date format

两盒软妹~` 提交于 2020-03-23 18:12:33
问题 I'm trying to get two datepickers on Angular with different date format, the issue is that the only way that is possible to change the format is with a DataAdapter that's customize, but that applies to all the datepickers. Any idea? Thanks! 回答1: You can add an extra input field for showing the date picker. And setting the original datepicker as hidden. This will let you set the one way binding for the bounded property and let you apply a pipe of 'date' type. Within that pipe, you can have any

Two datepickers on angular material with different date format

时光毁灭记忆、已成空白 提交于 2020-03-23 18:11:50
问题 I'm trying to get two datepickers on Angular with different date format, the issue is that the only way that is possible to change the format is with a DataAdapter that's customize, but that applies to all the datepickers. Any idea? Thanks! 回答1: You can add an extra input field for showing the date picker. And setting the original datepicker as hidden. This will let you set the one way binding for the bounded property and let you apply a pipe of 'date' type. Within that pipe, you can have any

Open Angular Material Menu Programmatically using ViewChild on MatMenuTrigger

天大地大妈咪最大 提交于 2020-03-23 07:09:31
问题 How can an Angular Material menu be opened programmatically using Template Reference Variable on button trigger, which is accessed in component using ViewChild? The menu opens normally on click, but I'd like to open it programmatically on mouseover. (mouseover) event handler gives error: Cannot read property 'openMenu' of undefined. So why is clickHoverMenuTrigger undefined in the component? Here's the component html <button mat-icon-button [matMenuTriggerFor]="clickHoverMenu"

Angular 6: How to hide radio circle using Angular Material and use NgStyle for checked answer?

末鹿安然 提交于 2020-03-22 03:41:07
问题 I'm having trouble with two things: Hide circles of mat-radio-group Change p tag background to blue if checked I've tried using ::ng-deep to override css properties and change colors to white, tried to configure invisibility:hidden but none worked. Also, I tried to use ngStyle to configure that the background color of p tag will be blue if checked but it didn't work. This is the HTML: <div class="container-fluid"> <header class="lesson-heading" *ngIf="currentQuestion"> <span class="title"><

MatExpansionPanel expression has changed after it was checked error 'mat-expanded: true'

喜你入骨 提交于 2020-03-22 03:38:13
问题 I have an Angular Material Expansion Panel Query list: @ViewChildren(MatExpansionPanel) matExpansionPanelQueryList: QueryList<MatExpansionPanel>; and a simple array: questions: []; The Expansion Panels are generated with an *ngFor : simplified for example: <ng-container *ngFor="let question of questions> <mat-expansion-panel ... When I extend the questions array, I want to open up the last expansion panel. extendQuestion() { this.matExpansionPanelQueryList.changes.subscribe( change => {