angular6

Error: Expected one matching request for criteria “Match by function: ”, found none

你。 提交于 2020-08-07 05:45:38
问题 I have a userService.spec.ts file that I want to test.The code goes this way. It calls a get function that calls the ADMIN_API_URL .I tried testing the given file but got an error that is mentioned in the title. My user.service.spec.ts file. describe('Service: User service', () => { let httpMock: HttpTestingController; let userService: UserService; let url: string; beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], providers: [ { provide: AUTH_API_URL,

Error: Expected one matching request for criteria “Match by function: ”, found none

戏子无情 提交于 2020-08-07 05:44:59
问题 I have a userService.spec.ts file that I want to test.The code goes this way. It calls a get function that calls the ADMIN_API_URL .I tried testing the given file but got an error that is mentioned in the title. My user.service.spec.ts file. describe('Service: User service', () => { let httpMock: HttpTestingController; let userService: UserService; let url: string; beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], providers: [ { provide: AUTH_API_URL,

Can't override the angular material theme with my css properties

情到浓时终转凉″ 提交于 2020-08-07 05:26:10
问题 I am using Angular 6.0.8 with Angular Material theme version 6.4.0 Whenever I try to slightly modify the material theme, it never works, as I always find the material theme properties to overwrite my CSS properties as follows: currentColor .mat-input-element (material theme) initial input, textarea, select, button (user agent stylesheet) #1072BA .English #1072BA .English #1072BA body Only the first property is applied (the rest are striked through) I have tried multiple variations to solve

Can't override the angular material theme with my css properties

旧时模样 提交于 2020-08-07 05:25:30
问题 I am using Angular 6.0.8 with Angular Material theme version 6.4.0 Whenever I try to slightly modify the material theme, it never works, as I always find the material theme properties to overwrite my CSS properties as follows: currentColor .mat-input-element (material theme) initial input, textarea, select, button (user agent stylesheet) #1072BA .English #1072BA .English #1072BA body Only the first property is applied (the rest are striked through) I have tried multiple variations to solve

Angular 6.x not working in IE 11 - Error: Invalid argument

寵の児 提交于 2020-07-23 05:05:24
问题 I have an Angular 6.x app running perfectly in Chrome. The problem is when trying to run it in IE 11, I'm getting the error: Error: Invalid argument. at DefaultDomRenderer2.prototype.setProperty... Already tried all answers in StackOverflow that I could find with no help. I'm listing theme here so you guys won't try them as answers: Added all polyfills needed for IE but still having the same problem. Added in head tag: <meta http-equiv="X-UA-Compatible" content="IE=11"> Thank you for helping.

Angular 6.x not working in IE 11 - Error: Invalid argument

自古美人都是妖i 提交于 2020-07-23 05:05:07
问题 I have an Angular 6.x app running perfectly in Chrome. The problem is when trying to run it in IE 11, I'm getting the error: Error: Invalid argument. at DefaultDomRenderer2.prototype.setProperty... Already tried all answers in StackOverflow that I could find with no help. I'm listing theme here so you guys won't try them as answers: Added all polyfills needed for IE but still having the same problem. Added in head tag: <meta http-equiv="X-UA-Compatible" content="IE=11"> Thank you for helping.

Angular 6.x not working in IE 11 - Error: Invalid argument

自闭症网瘾萝莉.ら 提交于 2020-07-23 05:03:13
问题 I have an Angular 6.x app running perfectly in Chrome. The problem is when trying to run it in IE 11, I'm getting the error: Error: Invalid argument. at DefaultDomRenderer2.prototype.setProperty... Already tried all answers in StackOverflow that I could find with no help. I'm listing theme here so you guys won't try them as answers: Added all polyfills needed for IE but still having the same problem. Added in head tag: <meta http-equiv="X-UA-Compatible" content="IE=11"> Thank you for helping.

How to use routerLink with innerHTML

纵饮孤独 提交于 2020-07-22 06:01:28
问题 I am working on angular6. I just want to create the dynamic route by using the innerHTML.I tried the following code but it is not working. In the component file, I wrote the following code inside the constructor this.anchor = "<a routerLink='login'>Dynamic Login</a>" In the template file, I wrote the following code <div [innerHtml]="anchor"></div> 回答1: this.anchor = "<a routerLink='login'>Dynamic Login</a>" <div [innerHtml]="anchor"></div> Above codes won't cause Angular to process anything

Angular6 open/show component by service

与世无争的帅哥 提交于 2020-07-22 05:52:09
问题 I built an angular component to use as a dialog for my app (e.g to show application errors) and a dialog- service to open/show that dialog from other components. dialog.component.html <kendo-dialog *ngIf="opened"> <div> Some Content </div> </kendo-dialog> dialog.compontent.ts import { Component, OnInit } from '@angular/core'; import { Dialog } from './dialog'; // Model @Component({ selector: 'dialog', templateUrl: './dialog.component.html', styleUrls: ['./dialog.component.scss'] }) export

How to use colspan and ngFor in Angular material 6 table?

╄→гoц情女王★ 提交于 2020-07-10 08:14:16
问题 I'm using Angular Material to render the table. Code: <ng-container matColumnDef="type"> <th mat-header-cell *matHeaderCellDef> Workout type </th> <td mat-cell *matCellDef="let workout"> {{workout.type}} </td> </ng-container> <ng-container matColumnDef="set1"> <th mat-header-cell *matHeaderCellDef> Weight x Reps </th> <td mat-cell *matCellDef="let workoutData"> {{workoutData.workoutSessions[0].sets[0].weight}} x {{workoutData.workoutSessions[0].sets[0].repetitions}} </td> </ng-container> <ng