Category "angular"

Jasmine unit test Angular service with nested spies

I´m trying to test this Angular service which uses af.firestore.collection, not just af.collection, as shown below, so to be able to access the onSnapshot

couldn't find file 'owl.theme.default' with type 'text/css' error in rails 5.1.4

im getting the below error. Sprockets::FileNotFound at / couldn't find file 'owl.theme.default' with type 'text/css' Checked in these paths: /home/xyz/abc/pr

How to Capitalize the First Letter of the Kendo-DatePicker format in Angular?

I have a kendo-datepicker and it's always displaying the format in the field like following. But I want to customize this as Month/Day/Year. Capitalize the fir

Getting Values from Angluar Page

I want to get Information from Input Field and post them as http. I found a way, but would be like to hear if there is a better one because it seems to be ugly

File upload Angular 13 Spring boot rest Required request part 'file' is not present

I'm searching since days now for a solution and can not find any. I have a simple Spring Boot Rest application (Spring version 2.6.7) with an endpoint to upload

jasmine window.location.reload in ngOnDestroy

public ngOnDestroy(): void { window.location.reload(); } How can I unit test this? All answers I found didn't work or only worked when the test was the only on

WebSocket from HTTPS website to different port, self-signed certificate

I am facing issues when trying to connect from a browser via WebSocket to a server. Website is hosted on a default port (80, 443, configurable - this is s selfh

Merge my initial state with data from API

I don't understand why my state data was not merged with my initial state In my initial state i have: data: {role: null, lastUrl: null}, When my call api is ove

Passing Angular component to another one

I know this has been asked before but I don't understand those answer to be honest. I want to make something simple: Basically I have this: <div class="carou

Error when installing ng add @ng-bootstrap/ng-bootstrap

There comes an error when installing ng-bootstrap to my Angular-CLI(11.0.4). When ng add @ng-bootstrap/ng-bootstrap And my log file [error] Error: npm ERR! co

ERROR Error: NG0201: No provider for NgControl found in NodeInjector

i ran completly out of ideas. I want to user Reactive Forms Module, so i imported it in app.module.ts like import { ReactiveFormsModule } from '@angular/forms';

Openlayers map in Angular is blank when switching components

I have a MapComponent which loads an OpenLayers Map. This component is re-used in various of my Angular app's pages. The map loads fine the first time. However,

Angular Jasmine testing - substring remove from number

I have some difficulties in unit testing a function. I'm new in these things and I don't know what I can do. I have to those 2 if. Any advice? Thank you.

Angular debugger won't continue

This has been going on for some months but we are really getting anoyed by it. So in the summer of 2020, we upgraded our packages in our angular project and all

How to get boundary box corner in CRS units in Cesium?

For my project, I am using cesium to display on a map WMS layers (On 2D map). To increase performances, I use the provider SingleTileImageryProvider to request

How to rename Angular Universal entry file to app.js and move it to the app root directory

So I have an Angular Universal SSR app which runs with node. The latest Angular and Universal versions as of 21/01/2021. My hosting company allows me to run nod

Angular RxJS - Subscribe to Observable only IF subscribing to another Observable gave a certain result

I need some kind of special RxJS syntax if it exists for this scenario: this.electronicInvoiceService.getElectronicInvoice(this.invoiceId) .subs

Angular testing async function generate error - 1 periodic timer(s) still in the queue

I'm trying to test that two async functions. The problem is that one of the functions is called every 10 seconds automatically. I tried to use tick() or flush()

edit inline angular (change detection strategy, subject, behavior subject)

my output Here is my code: https://stackblitz.com/edit/angular-ivy-w3lop5?file=src%2Fapp%2Fapp.component.html I am just a beginner for few days. I dont understa

Angular mat form field appearance

How do I implement this in Angular 12? below is the code in my html: <mat-form-field style="width: 70px;" [appearance]="somevariable ? 'none' : 'legacy'" &