Category "angular"

Looping through Angular QueryList

So I want to get all the images in my component in an array, so I am using Angular's @ViewChildren which returns a QueryList of ElementRef: @ViewChildren('img

Passing array and got: ERROR Error: NG0900: Error trying to diff '[object Object]'. Only arrays and iterables are allowed

I'm developing the front-end of a crud application on angular, and i got this error when passing an array: ERROR Error: NG0900: Error trying to diff '[object O

In an Angular 8 SSR app, there is a memory leak

I have an angular SSR app that causes memory leaks on the server it keeps on increasing memory on the server when the application is used and opened by many use

RxJs: Incrementally push stream of data to BehaviorSubject<[]>

Basically I'm trying to inflate BehaviorSubject<[]> with array of data which will be loaded in chunks. BehaviorSubject<[]> will be added with new c

Reconnecting a websocket in Angular and rxjs?

I have a ngrx/store (v2.2.2) and rxjs (v5.1.0) based application that listens to a web socket for incoming data using an observable. When I start the applicati

Cannot approach Typescript enum within HTML

I made an enum with Typescript to use in MyService.service.ts MyComponent.component.ts and MyComponent.component.html. export enum ConnectionResult { Succ

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