Category "angular"

How to do something conditionally with Observables before subscribe?

I'm trying to implement a solution that execute the following steps: Check if a condition is valid with a filter. Check if Ctrl is pressed and execute some fun

How to write unit test for a service having breakpoint observer?

I have a service having a breakpoint observer. But how we can trigger window resize event for breakpoint observer to cover all branch and lines. export class B

How to write unit test for a service having breakpoint observer?

I have a service having a breakpoint observer. But how we can trigger window resize event for breakpoint observer to cover all branch and lines. export class B

Chartjs error : time scale: "time.format" is deprecated. Please use "time.parser" instead

I am using Chartjs for my project. Different versions I am using are: ChartJS 2.9.3, Chartjs-plugin-streaming 1.8.0, moment.js 2.24.0,chartjs-adapter-moment 0.1

What is the purpose for webcomponents-sd-ce-pf.js

I am building a webcomponent based application and I am eliminating unnecessary code in my bundles. To compile es5 elements, I've added the webcomponentsjs poly

Is there any way to find out what is triggering change detection in Angular 2?

I recently released a new component and it seems to be triggering change detection multiple times a second: // some debugging code ngDoCheck() { consol

Mocking base class in a unit test for Angular 2

I'm trying to write a unit test to see if the base class method gets called Here is the base class export abstract class Animal{ protected eatFood() {

How to prevent the select tag to auto select the first option?

I want to add a floating placeholder for the select tag. But the select tag is choosing the fist option by default. I don't want to put an extra option without

Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'

Got this Error after running webpack. Webpack is installed globally and I'm running Node PS D:\Projects\ng2-admin-master> ng serve Cannot find module 'webpa

@ngrx/store - The store does not return the data in async/away manner

I have a problem while getting the value from the store. The operation hangs. I try to get the data in the following way: async onInit(params: Params) { //

Sign in with apple on the web with Capacitor plugin not redirecting

I am trying to implement Sign in with Apple functionality in my Ionic app. In order to do that I am using the plugin: https://github.com/capacitor-community/app

How to upload a modified angular2 module to server in production?

I am using angular2-image-gallery. It is causing me an error on production (also locally) about importing twice BrosweModule from angular. In my local build, I

Angular Interceptor ignoring observable when refreshToken is invalid and not catching errors

This is my first question here on Stack Overflow, I've been bashing my head with this problem for a few days and can't seem to find anything related to what's h

How to close the payment interface if the payment failed in Stripe Google pay?

Need to close the payment interface if the payment fails. Now it showing error instead of close. paymentRequest.on('paymentmethod', function(ev) { console.l

angular-cli different versions in the same computer

I'm working with Angular2 in several projects. Each of this projects uses a different version of angular-cli, so, I need to be able to run and compile for produ

Cypress: How to properly close a mat-select

So I'm using Cypress for testing our Angular application, but for some reason I always have an issue with closing mat-select components which are multiselect. H

Angular: Swiper carousel is not working - Error: node_modules/swiper/angular/angular/src/swiper-events.d.ts

I am trying to create a carousel in angular using swiper (https://swiperjs.com/angular). I get this error: Error: node_modules/swiper/angular/angular/src/swiper

Bootstrap Table in Angular 12

i create a table with bootstrap; im using angular 12, when i use only one component with table head and body works fine, when i create another component with ta

Jest Angular svg template

I have several components in my Angular 9 app that have their templates defined in svg file like templateUrl: './eye.component.svg'. When I run tests it errors

Get current route without parameters

I need to get my current route without params in Angular 2, I found a way to get the current route with params as follows: this.router.url and then split it