angular-material

md-tabs with angular ui-router not rendering grandchildren

谁都会走 提交于 2019-12-24 07:08:08
问题 I am using Angular 1.6.2 with Angular Material 1.3 and making fairly heavy use of components. I have an outer "appComponent" that wraps the rest of the app and provides a header toolbar with navigation, a footer and then my top-level app components load within a ui-view inside the app component. One of my components is a customer maintenance page that has a list in a tab on tab 1 and then customer specific details on tab 2. tab 2 loads another template via ng-include that includes several

Angular material md-select not closing when in mdDialog

风格不统一 提交于 2019-12-24 06:57:26
问题 I am using angular material version 1.1.4, angular version 1.5.9 and I have the following issue with an md-select directive. I open a dialog using $mdDialog service on a click of a button. The dialog is fullscreen. Inside I have multiple inputs, along with an md-select input. On md-select you can choose multiple items, so it doesn't automatically close after choosing an item from the list. After opening it and selecting the items you desire, you click outside of it to close it and get to the

CDK Angular Table with dynamic checkboxes not finding correct column names

南楼画角 提交于 2019-12-24 06:14:24
问题 I have a dynamic CDK Angular Material mat-table that I have fixed a mat-checkbox to. It is populating data, but it is not allowing me to set the correct column headers. Everything that gets displayed is from the key:value pairs from the UserInformation array. However, I need to set a second array to display the correct header names as I will not have control of the key names coming from the API and will need to set them in the TypeScript. Not all information coming from the API will be

Side Nav bar not working - 'ng-template' is not a known element:

谁都会走 提交于 2019-12-24 06:00:33
问题 I followed all the steps that are shown in the material.io npm install --save @angular/material When I am trying to use the side-nav bar component that is shown at -https://material.angular.io/components/component/sidenav I throws 'ng-template' is not a known element' error. 回答1: material.io is different than angular material: material.angularjs.org, is two different libs, so you need to install, use: npm install angular-material 回答2: Material-UI is a react library that is built with Google's

Change color of mat-spinner

醉酒当歌 提交于 2019-12-24 05:39:13
问题 How to change color of mat-spinner i tried this but doesn't work Html <mat-spinner [color]="red" ></mat-spinner> <mat-spinner [color]="#ffffff" ></mat-spinner> 回答1: This code worked for me : scss .mat-spinner-color::ng-deep circle{ stroke: #FFFFFF !important; } html <mat-spinner [diameter]="25" class="mat-spinner-color"></mat-spinner> 回答2: The color input accepts three values: primary : The primary palette of your app warn : The warn palette of your app accent : The accent palette of your app

Trying to change the material md-selected tab using custom code from directive using two way data binding

末鹿安然 提交于 2019-12-24 05:23:04
问题 I'm trying to change the tab using code and can't seem to figure out the error. The basic thing works if we use the controller to change the variable but when I try to bind it through directive, it brokes. var app = angular.module('MyApp', ['ngMaterial']); app.controller('HelloCtrl', function($scope) { $scope.selectedTab = 0; }); app.directive('something', function() { return { restrict: 'E', template: '<div ng-click="changeNavigation()">Change Navigation</div>', scope: { selectedTab: '=' },

Material Design Table is not accepting dataSource object

我的未来我决定 提交于 2019-12-24 05:08:10
问题 I am getting following error: compiler.js:486 Uncaught Error: Template parse errors: Can't bind to 'dataSource' since it isn't a known property of 'table'. I am inserting a table into a custom material modal component which should show a list of history entries. HistoryComponent: import { Component, OnInit, ViewChild } from "@angular/core"; import { MatTableDataSource, MatSort } from "@angular/material"; @Component({ selector: "app-history", templateUrl: "./history.component.html", styleUrls:

Angular 2 + Material: Unable to use map-get with 2nd parameter “text”, “card” and others

大城市里の小女人 提交于 2019-12-24 03:27:41
问题 Using Angular 2 (4) + Material, I need to customize a component's theme. I first try with the built in palettes but keep getting "error: undefined". It works only if map-get is passed "primary", "accent" or "warn" as second parameter: styles.scss @import '~@angular/material/theming'; @include mat-core(); @import 'app/app.component.scss-theme'; $default-theme-primary: mat-palette($mat-light-green); $default-theme-accent: mat-palette($mat-indigo); $default-theme-warn: mat-palette($mat-red);

mat-select not showing initially selected item

六眼飞鱼酱① 提交于 2019-12-24 03:26:20
问题 I'm using <mat-select-trigger> in order to display selected items - in this case payment methods: <div style="padding-top: 24px;"> <mat-form-field style="width: 100%;"> <mat-select placeholder="Zahlungsmethode" [(value)]="selectedPaymentMethod"> <mat-select-trigger> <div style="display: flex; align-items: center;"> <img [src]="selectedPaymentMethod.imageUrl" style="align-self: center; margin: 0 8px;"> <span>{{selectedPaymentMethod.displayText}}</span> </div> </mat-select-trigger> <mat-option

Angular 6: npm ERR! cb() never called when installing angular cdk

故事扮演 提交于 2019-12-24 02:55:13
问题 I am installing angular material here is what I have done Angular material successfull installed by the following command 1.npm install --save @angular/material Angula CDK fail to install by using the following command 1.npm install --save @angular/cdk I get the following error in cmd: npm WARN tar zlib error: unexpected end of file npm ERR! cb() never called! npm ERR! This is an error with npm itself. Please report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! A