Category "angular"

@Injectable giving undefined in angular 13

Hello guys I've recently updated angular to the version 13 and I'm experiencing some issues regarding DI. When I call the ReflectiveInjector.resolveAndCreate()

How to return Observable from Callback

I have a service in which I want to implement the logic of an SDK. From this SDK I want to call an event that returns a payload. I want to create a method in wh

Angular not passing object to html page

I am having issues with learning angular, I didn't use to have these problems before, but now when I do these demos things work great until I switch from using

Angular - Async pipe in ngIf and text binding will not display first emitted value

I have very simple component template: <button (click)="emitNextValue()">Next Value</button> <p *ngIf="text$ | async"> {{ text$ | async }}

How to test an Angular method which calls service and gets values?

I am trying to test this method, I have tried spying but the coverage shows not covered. Basically what this method does is, it checks if there is data availabl

How to disable scroll on body when clicking on a p-dropdown within it

I am using few p-dropdown in my table header where I also have a horizontal scroll for it's container. When I click on any of these dropdowns, instead of openin

send "&" in url angular

I'm using the Angular version 12 I want to send the following object in query params: { dynamicQueryOperators: 6&dynamicQueryOperators=8 } But in the end

webpack-dev-server Disconnect and Trying to reconnect... spam

I just finished an angular project I was working on, but i noticed something in the console, which I'd love to hide if that's possible just to keep everything t

optional chaining in Angular Template

Compiled with problems:X ERROR src/app/components/users/users.component.html:2:22 - error TS2532: Object is possibly 'undefined'. 2 <ul *ngIf="loaded &

Flexbox: Making an inline component expand the full width of the the parent container

I have inherited this project from someone else and I would not have set it up like this in the first place, but I have this component list-item-component: <

Angular bootstrap dropdown-toggle not working

Add a css class dynamically: In my angular application, I am using bootstap dropdown,dropdown-toggle to display drop down on click of a button. But the drop dow

typescript - detect if the div is overflow with text (not working if -webkit-scrollbar display is set to none)

Below mentioned code works fine if the scrollbar is visible. But it stops working once i use ::-webkit-scrollbar {display: none;} and -ms-overflow-style: none;

Access JSON like object properties

I have a return object like so: Can you tell me how to access its properties? I have tried many ways with Lodash too. But no luck yet. Failure attempts: t.conf

window.postmessage() data is not recieved instantly rather than i have put a setTimeout function to pass the data

I am using window.postmessage() to send the data across domains to a popup but, postmessage is not sending the data instantly i.e. when captured on other domain

How to use ${text} interpolation from a variable in Angular?

This question is about ts inline text interpolation in Angular (not template interpolation for the HTML files). I couldn't find relevant information about my qu

Angular Migration Error for Version 13.0.3

I got the following issue while upgrading from Angular 12 to 13.0.3. Using package manager: 'npm' Collecting installed dependencies... Found 79 dependencies. F

How to indicate the specific datapoint on the XY am4chart upon clicking on it?

It may seem really trivial but I haven't been able to find the solution for my problem anywhere. So I have a classic XY am4chart with couple hundreds data point

ionic ble : not able to show the updated ble device name on change

ok so i have created an app using ionic and angular and i want to change the ble device name. For that i am using ionic ble(ble.writeWithNoResponse) ionic-ble g

Angular Node - require not being used

In my Angular 13.x / Typescript 4.x project I have a reference to a node_module @types\prosemirror-schema-list In it the code uses require : I added import Ord

mat-icon text is showing in dropdown and icons in Angular

I tried using mat-icon in Angular in dropdown. But the text is shown first and after clicking dropdown it is showing the icons. I already tried importing in ind