Category "angular"

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

Where is the file angular-cli.json in the new @angular/cli version?

I'm new in angular2 and i have tried to create a project with cli, but when I try to change the css adding it in angular-cli.json, I have detected that this fil

Angular 13: Dynamic Html with data binding

My Requirement is to bind data to dynamically added HTML content. for i.e, app.component.html <div> <p> {{data.name}} </p> <div cla

Angular 9 compilation errors after migration from Angular 8

I migrated my angular app from version 8 to 9. After running ng serve --open, my app opens in the browser and gets stuck at the loading screen with this error

How to enable experimentalForceLongPolling in @angular/fire

There is an issue with Cypress and Firebase, based on some research I've done here it seems that Cypress intercepts all network requests and due to the nature o

@use is coming soon, but it's not supported in this version of Dart Sass

I am running ng serve with an Angular cli project which includes Sass. I have been using @import and @include with no problem, when I added @use, the terminal t

Remove all items from a FormArray in Angular

I have a form array inside a FormBuilder and I am dynamically changing forms, i.e. on click load data from application 1 etc. The issue I am having is that all