angular-material

Unable build the angular 2 project using ng build --prod

血红的双手。 提交于 2019-12-24 09:24:38
问题 I have created a angular 2 project using angular material. I am trying to host my project using firebase deployment process. My application is successfully running on my server.But when I am trying to build my application its giving me the following error as shown below in the image. please help me to resolve this 回答1: Solution : for let- is only support for ng-template error. You have use let-variablename some where in you html side. The error says you can't use it anywhere instead of ng

how to close a mat-accordion when other mat-accordion is opened?

不羁的心 提交于 2019-12-24 09:03:35
问题 I'm using Angular Material with Angular v6. I have two accordions where each accordion contains an expansion panel. How can I close the opened accordion when I open the other accordion? Both of the accordions stay open now! Code: <!-- first accordion --> <mat-accordion> <mat-expansion-panel mat-list-item *ngIf="menuitem.type === 'sub'"> <mat-expansion-panel-header class="main-header"> <mat-panel-title> <mat-icon class="list-icon">{{ menuitem.icon }}</mat-icon> <span class="name">{{ menuitem

The best way to collect data from multiple components into one in Angular 6

廉价感情. 提交于 2019-12-24 08:55:29
问题 I am relatively new to Angular, and I understand my question might be very primitive, but please advice me the best solution in my case. I have a Stepper (from Angular Material); the contents of each step are inside different components; in all the steps we collect data from a customer using multiple input fields. The code looks like below. Stepper: <mat-horizontal-stepper #stepper> <mat-step [stepControl]="stepOne"> <ng-template matStepLabel><span class="someClass">Customer Information</span

TypeError: table.renderRows is not a function

China☆狼群 提交于 2019-12-24 08:39:59
问题 I'm using Angular material datatable with array as datasource. I would update my table every data change using renderRows() method as mentionned in the doc. I have my ts file import { Component, OnInit } from '@angular/core'; import { MatTableDataSource } from '@angular/material'; import { AjouttextService } from '../ajouttext.service'; import { DataSource } from "@angular/cdk/collections"; import { Observable } from "rxjs/Observable"; import { nomchamp } from '../model'; @Component({

Add directives to component selector when it is declared - Angular 7

故事扮演 提交于 2019-12-24 08:04:11
问题 I am learning Angular and am creating components dynamically on the click of a button. I am trying to use Angular Material's drag and drop feature to drag these created components to sort them. I have the following code in my base component html: <div cdkDropList style="margin: 20px" (cdkDropListDropped)="drop($event)"> <div #container></div> </div> And the Typescript code has the following code: @ViewChild('container', {read: ViewContainerRef}) container: ViewContainerRef; const

Override Angular Material Component

只谈情不闲聊 提交于 2019-12-24 08:02:14
问题 I want to override the Angular Material select component (https://material.angular.io/components/select/overview) so that I can change the appearance of the now input-field to an icon button for example. I want to do this because it should somehow work as a dropdown. I already tried the overriding of the select and the component works very well like this. I saw in this answer: How to override CSS or re-skin for node_module? that I would need to create a new npm package and publish it. But the

angular 1.5.5 material design gives me Unknown provider: $$HashMapProvider <- $$HashMap <- $$animateQueue <- $animate error

拟墨画扇 提交于 2019-12-24 07:49:47
问题 I am trying to use angular material 1.5.5 with angular 1.6.5. My code is as shown below: index.html <!DOCTYPE html> <html> <head> <title>xyz</title> </head> <body ng-app="xyz"> <ng-view></ng-view> <script src="bower_components/angular/angular.js"></script> <script src="bower_components/angular-route/angular-route.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5

Angular 2 Material SideNav always open on desktp and normal on mobile

拥有回忆 提交于 2019-12-24 07:47:27
问题 I made this simple side nav in angular 2 material. I want to keep oppened="true" only for desktop and keep the default behavior for mobiles and laptops. This used to be present in Angular JS material. How do I implement this in Angular 2 ? <md-sidenav-container fullscreen> <md-sidenav #sideNav> <md-nav-list> <a>One</a> <a>Two</a> </md-nav-list> </md-sidenav> <md-toolbar color="primary"> <button md-icon-button (click)="sideNav.toggle()"> <md-icon>menu</md-icon> </button> <span>Title</span> <

text-mask is not working for angular 2

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 07:25:31
问题 Trying to use https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask Uncaught Error: Template parse errors: Can't bind to 'textMask' since it isn't a known property of 'input'. ("lex="18" fxFlexOffset="1"> <input [ERROR ->][textMask]="{mask: numberMask}" type="text" [(ngModel)]="myModel" ): I am using "angular2-text-mask": "^8.0.4", "text-mask-addons": "^3.7.1", "text-mask-core": "^5.0.1", Imported in my Module imports: [ BrowserModule, FormsModule, TextMaskModule ] trying

md-swipe-left and md-swipe-right is doing same functionality (moving only left) on md-tabs in angularjs

微笑、不失礼 提交于 2019-12-24 07:17:40
问题 enter image description hereangular material's md-tabs swiping functionality is not working properly i.e in two ways .It is working fine for left but when i swipe to right , left functionality is firing. Here. I open site with mobile mode. so the swiping is working well with arrow button click event. but when i swipe on the tabs for left swipe it is working but for right swipe also it is doing same functionality as left swipe 回答1: The issue is caused due to 'pointerevents' API. The