Category "angular"

Chartjs bar chart blurry when height is set

I am using chartjs 2.7.3 and I have a problem when setting the size of the div that encloses canvas the image is blurry and letters are not visible like the scr

Issue: No 'Access-Control-Allow-Origin' header is present on the requested resource

My problem is that I can't access to GET method from my Angular app because of the issue: Access to XMLHttpRequest at 'https://localhost:44337...' from origin '

Cordova 9.1 Android Application white screen for Android 10- (works for Android 10 +)

I created a small angular application where I added Cordova to generate a web and android application. Everything was ok when I used angular version 6 and Cordo

node.js not found (but installed) when compiling the default angular project in Visual Studio 2019

I've created in Visual Studio 2019 a default Angular project with .NET Core 3.0. When I build the project and run it, I obtain the following error: error : No

webpack-dev-server error after migrating to angular 13

After my migration from angular 12 to angular 13, i am getting the following error in the console: Also if i change something in my code the browser does not r

Angular 2 - Does ngOnDestroy get called on refresh or just when navigate away from component?

I am trying to figure out if ngOnDestroy in Angular 2 gets ran on a refresh or just when someone navigates away from the page?

TypeScript TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'

Im getting this compilation error in my Angular 2 app: TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. The piec

Show div if no data in api response Angular

If not data is received on api response, it shows a div. Is the below the best way to do it? At the moment if I click on my search button with the getAll() meth

How to test a component with a renderer in the constructor

Consider this code: import { Component, OnInit, Renderer, OnDestroy } from '@angular/core'; import { TranslateService } from 'ng2-translat

How to test ng-web-apis/geolocation Observable in angular 8?

I'm trying to test a simple angular 8 service that gets user location using GeoLocation Service from Web APIs for Angular public enableGPS() { if (!this.lo

Input binding not working on custom made angular library

I've built an Angular library that I can import into outside applications. Withing my library exists a component called 'MainComponent' that has a single @Input

Input and outputs, how to work with them to follow the naming convention of the Angular 2's styleguide?

Before I knew any better I used to have my directive defined like this: ... inputs: [ 'onOutside' ] ... export class ClickOutsideDirective { @Output() on

Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays

I looked at similar questions, but none of them helped me. I am going to receive an object like the following: [ { "id": 1, "name": "Safa", "emai

Ionic-angular ion-textarea's height shrink

I'm coding with ionic-angular framework for some project. When I use ion-textarea, sometimes the textarea's height is decreased 0px. If the textarea code like t

Different routes same component

I want to achieve something like this /products shows all the products and /products/:category shows all the products related to a specific category. To achieve

How to manage Angular2 "expression has changed after it was checked" exception when a component property depends on current datetime

My component has styles that depend on current datetime. In my component I've got the following function. private fontColor( dto : Dto ) : string { // da

Angular Textbox Undefined

So I'm trying to programmatically edit a textbox in a webpage through chromes developer console. This is the code of the textbox. <input formcontrolname="use

Set default launcher flags when I run ng test without additional arguments

I need to pass custom argument to chrome in order to set locale: --lang en-US I've done it using customLauncher. My src/karma.conf.js: module.exports = functi

Bug mat-drawer-content height 100% angular 8

css: .mat-drawer-content { position: relative; z-index: 1; display: block; height: 100%; overflow: auto; } Hello, I have a problem that

BehaviorSubject vs Observable?

I'm looking into Angular RxJs patterns and I don't understand the difference between a BehaviorSubject and an Observable. From my understanding, a BehaviorSubj