angular-material

Angular refresh table after delete record, using material table and rest api

一个人想着一个人 提交于 2020-01-05 08:33:21
问题 I have a material Table with expandable rows (https://material.angular.io/components/table/examples) and I want to manage delete into the table itself, so I create a delete button with a function that trigger the delete event. The api works, the record is correctly deleted, but the table is not refreshed after delete, and I want to implement this behaviour. Here a stackblitz with fake api: https://stackblitz.com/edit/angular-comzph I try, in my delete function to call ngOnInt and to navigate

Material autocomplete not displaying list on click

China☆狼群 提交于 2020-01-05 07:13:09
问题 I have a material autocomplete. I am making an ngrx call to pull the data. //parentcomponent.ts this.store.select(fromStore.getSearchFormStateMessageTypeListData).subscribe(msgTypeList => { if (msgTypeList.length > 0) { console.log('msgtypelist ='+msgTypeList) for (var i = 0; i < msgTypeList.length; i++) { this.messageTypeList.push(msgTypeList[i]); } } else { this.store.dispatch(new fromStore.GetGlobalSearchMessageTypeList({})); } }) //parentcomponent.html <mat-card style="margin: 1px;">

It's possible Overwrite mat-monthly-view component on mat-datepicker to add week number column?

自作多情 提交于 2020-01-05 04:24:05
问题 I'm trying to add a week number column to the mat-monthly-view component used in the mat-datepicker component from angular material. I thought to extends the current mat-monthly-view and in some how tell to my module that when the mat-monthly-view are called substitute it by my extended one. But i do not find the way. have Angular support for this kind of solutions? UPDATED Module: providers: [ { provide: MatMonthView, useClass: MyMonthView}, ] componet: @Component({ selector: 'my-month-view'

Changing CSS from Angular Material Checkbox

99封情书 提交于 2020-01-05 04:21:08
问题 can someone tell me, how I can change the colour of the round circle when you click the angular material checkbox. Shown in the following image (the pink circle) Here is the link from the official webpage: https://material.angular.io/components/checkbox/overview Thanks for the Help 回答1: The checkbox (both the checkmark and the ripple), by default uses the accent color from your theme. You can change it to use the primary color by using the color = "primary" property on the element. If you

Angular Material md-select Displaying quantity selected

こ雲淡風輕ζ 提交于 2020-01-05 04:10:11
问题 Is there a way using Md-select for angular material to display how many checkboxes were checked instead of displaying all of the selected values. For example If I have 4 options pepperoni, cheese, sausage and veggies and I select three of them . How would I display "3 Selected", Instead of writing out the entire selections. 回答1: Do you mean something like this? - CodePen Markup <div ng-controller="SelectOptGroupController as vm" class="md-padding" ng-cloak="" ng-app="MyApp"> <div> <h1 class=

When exactly is ng-checked called

旧街凉风 提交于 2020-01-04 15:28:15
问题 While using AngularMaterial, I have ng-checked like this: <md-list> <md-list-item ng-repeat="option in options"> <p> {{ option }} </p> <md-checkbox class="md-secondary" aria-label="{{$index}}" ng-checked="exists($index)" ng-click="toggle($index)"></md-checkbox> </md-list-item> </md-list> And my exists function: $scope.exists = function (optionNum) { console.log('Inside $scope.exists. option: '+optionNum); }; My timer: function updateTimer() { var onTimeout = function(){ mytimeout = $timeout

When exactly is ng-checked called

孤者浪人 提交于 2020-01-04 15:28:11
问题 While using AngularMaterial, I have ng-checked like this: <md-list> <md-list-item ng-repeat="option in options"> <p> {{ option }} </p> <md-checkbox class="md-secondary" aria-label="{{$index}}" ng-checked="exists($index)" ng-click="toggle($index)"></md-checkbox> </md-list-item> </md-list> And my exists function: $scope.exists = function (optionNum) { console.log('Inside $scope.exists. option: '+optionNum); }; My timer: function updateTimer() { var onTimeout = function(){ mytimeout = $timeout

Angular 6 - Ng-Container - Ng-Template inside Mat-table is not working

此生再无相见时 提交于 2020-01-04 09:08:23
问题 I am loading data into the mat-table data source from an API. There is an addnewrow() method which would add a new row at the top. I am actually trying to make the first column of the table editable. (i.e) user can give input only if they create a new row. The rest of the data in the table should not be editable. So for that I use a local flag variable false by default. Based on the flag, I am creating ng-template with ng-container. . If it's a new row, the first column is the only editable

Change the color for the Angular Material Design label text (Angular 1.3.0 & ngMaterial 0.11)

柔情痞子 提交于 2020-01-04 06:32:09
问题 I have a setup an AngularJS app (1.3) with Angular Material (v10.1) - when I click into a input field (eg it is in focus) that is setup to use Material Design the label text changes to the default colour of blue - I want to change this to a color of my choice how is the best way to do this. <md-input-container class="md-block"> <label>Name</label> <input required> </md-input-container> Once I focus on the input field above the label changes the colour of the text 'Name' to blue - what is the

Material select with material-icons issue

拟墨画扇 提交于 2020-01-04 06:27:21
问题 I want to add an icon to every option in my mat-select <mat-form-field> <mat-select placeholder="warningtype" [(ngModel)]="selected.warningType" matInput #warning="ngModel" name="warning"> <mat-option *ngFor="let warning of warnings" [value]="warning.value"> <div> <span *ngIf="warning.label === WarningType.ERROR"><i class='material-icons red'>highlight_off</i></span> <span *ngIf="warning.label === WarningType.INFO"> <i class='material-icons blue'>error_outline</i></span> <span *ngIf="warning