683 questions
1
vote
1
answer
98
views
`this` not set to component instance when creating component programatically
I have a directive that reads src attribute and appends a DynamicComponent. It also sets an input property of DynamicComponent.
@Directive({
selector: '[appDynamic]'
})
export class InjectDirective {...
1
vote
1
answer
66
views
Circular dependency Error in /turbo_modules/@angular/[email protected]/bundles/compiler.umd.js (2845:21) Can't resolve all parameters for BService: (?)
A-Service.component.ts
` import { Injectable, Inject } from '@angular/core';
import { BService } from './BService';
@Injectable({
providedIn: 'root',
})
export class AService {
constructor(...
1
vote
1
answer
112
views
Angular 11 - Route using named outlet redirects to '/'
I'm upgrading an Angular application from v10 to v11 that uses routerLink pointing to the outlet named dialog to create modal dialogs. The current component (CoreComponent in the example below) should ...
0
votes
0
answers
63
views
Angular11: fileReplacements stopped working after angular update
My team and I are updating the Angular version of our app. We were using version 10.2.3 and migrated to 11.2.19 in angular/cli
Before updating, our environments files were replaced by fileReplacements
...
1
vote
1
answer
473
views
Angular 11 Ag Grid display radio in one column and do the row selection based on radio click only
I am using ag-grid (in an Angular project) to render a table and I want to display rows with respective radio in one column and when I click on it that only row selection for row not the entire row ...
0
votes
1
answer
694
views
Error importing the stylesheet file after upgrading from Angular 11 to 16
I have a project that I have just upgraded it from Angular 11 to Angular 16. When I try to compile (ng build) the fist two errors shown are these two:
./src/styles.scss - Error: Module build failed (...
0
votes
1
answer
531
views
error TS2322: Type 'string | number | Date' is not assignable to type 'Date' on a project that has just been upgraded to Angular 16
I have a project that I have just upgraded from Angular 11 to Angular 16. In Angular 11, I had all my DTO models created with the NPM package "ng-swagger-gen" from the Web API's Swagger JSON ...
1
vote
1
answer
81
views
How to submit the formarray in angular in the given format?
While submitting the form in angular, the data should pass like given below. Inside role menu only 1st index is passing. I want all the index data to be passed on submit.
{
"roleMenu":[{
...
0
votes
0
answers
533
views
Angular module lazy load cache issue
I have used Angular 11 in my single page application (SPA). I have used lazy load module in app-routing.module.ts. The issue is when I redirect to that module/component, it get the results from ...
0
votes
0
answers
221
views
Hide select all checkbox when search data not in list of ng-multiselect-dropdown
I am using ng-multiselect-dropdown version ^0.3.8 in my Angular project v11.It's working fine except one condition which occur when-
1- open select dropdown and search random thing which is not in ...
1
vote
0
answers
40
views
NgxAdmin freezes when load large Amount of nested data in Angular 11
using get by id API we fetch data for particular id in Angular 11
this is our form group
export class PromotionsService extends HttpService<Promotion> {
form: FormGroup;
constructor(...
0
votes
1
answer
109
views
Can i add amcharts dynamically on each page of dashboard where I am having multiple pages with multiple widgets?
I have dashboard where I can add multiple pages and widget to it which follows tabset structure. Widget includes amcharts, library charts.
On default page amchart is rendering correctly but when I ...
2
votes
0
answers
578
views
How to fix angular lz-string no export member
Error: node_modules/secure-ls/dist/secure-ls.d.ts:24:24 - error TS2694: Namespac ...
1
vote
0
answers
577
views
ng-particle options signature not miss matched Error
i am upgrading my angular 11.0.2 ngx-admin dashboard project to Angular 15.2.9
during package update i got following error
Error: node_modules/ng-particles/lib/ng-particles.component.d.ts:18:89 - ...
0
votes
0
answers
31
views
Hover Menu is overlap with Dropdown field -Angular
Over lap image
Step 1: I open Dropdown in my screen (it's consider component1)
Step 2: just hover my menu .(My menu open during hover on it)
both Dropdowns are overlapping.
If any way to restrict my ...
0
votes
1
answer
64
views
Detect Change in Select in Angular
I have some difficulties logging the year when you select the year.
I managed to hide the month and dates already though.
STACKBLITZ
Simple datepicker
<ngb-datepicker
[(ngModel)]="model"...
5
votes
0
answers
657
views
Integrating Play Integrity API in Ionic 5 Cordova app to detect rooted devices
I am developing an Ionic 5 app with Cordova and Angular 11, and I am currently using the SafetyNet Google API to detect rooted devices. However, I encountered an issue where the security check was ...
1
vote
1
answer
1k
views
PrimeNG Table: unable to keep in editable mode
I am working on PrimeNG Table inline editing functionality in angular. If I enter blank record in the input box I throw an validation message but once message is shown inline edit option disappears. I ...
0
votes
0
answers
502
views
Create a custom dropdown component with checkboxes in angular
I want to create a dropdown using angular multi checkbox, but I'm not sure how to do it in the "Angular way", that component will use in some places as a form control.
<app-custom-...
0
votes
1
answer
53
views
How to re-display a child's component element in the parent?
In my Angular 11 application, I have a component that displays a child component containing some table filters:
Parent
<table-filters></table-filters>
<table>
...
</table>
...
2
votes
0
answers
801
views
TypeError: Cannot read properties of undefined (reading 'filter') unit test karma-jasmine
trying to solve this issue it makes all tests failed!
i am using angular 11 with karma-Jasmine,
it happens cuz on one filter method inside function that called in ngOnInt
unit test file
it('should ...
0
votes
2
answers
59
views
Angular11 value set in service variable gets cleared for subsequent calls
I wanted to do conditional http call and got the solution from Angular 11 how to make one of the http request in higher order mapping conditionally
@Injectable({
providedIn: 'root'
})
export class ...
1
vote
1
answer
45
views
Angular 11 how to make one of the http request in higher order mapping conditionally
I want to use a better solution if exists so it will make the following simpler.
If this.projectguid is empty then want to use the switchMap call otherwise the other one.
Can anyone suggest me a ...
0
votes
1
answer
636
views
Angular - syncfusion ejs autocomplete selecting incorrect value
Using a Syncfusion EJS Autocomplete element in a search box.
The issue being reported is that the user is not able to select the value searched
I know the issue, is because the data passed to the ...
0
votes
0
answers
122
views
Angular unit testing Unhandled promise rejection: ObjectUnsubscribedError: object unsubscribed
while testing code facing Unhandled promise rejection: ObjectUnsubscribedError: object unsubscribed.
how can I solve this error?
0
votes
2
answers
71
views
Getting an error while converting angular 10 to angular 11
installed node verion 16.13 previously it was node v 14.18.1
npm ERR! code ERESOLVE
Blockquote
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]....
1
vote
1
answer
412
views
Angular Unit - Testing (Jasmin Karma) : Error :Cannot find name 'google'
google.directives.ts:-
getAutocompletes(addresstext: ElementRef) {
const autocomplete = new google.maps.places.Autocomplete(addresstext.nativeElement,
{
...
});
google.maps....
3
votes
1
answer
2k
views
Angular Unit - Testing how to subscribe event emitter
In my unit test I want to call openDialog, openPdf, getPath with these three eventemitter that are in the ngOnDestroy method. How can I call them?
component.ts:
pdfPath: string = ''; // will be edited ...
0
votes
1
answer
1k
views
How do I create an HTML responsive table with first 3 fixed/frozen left column and a scrollable body in angular 11?
I'm working on angular 11 and ng-bootstrap 9.1 and i need to make a table with first 3 columns fixed and at the same time it should be responsive too, I've made it fixed but couldn't find a foolproof ...
0
votes
0
answers
76
views
Unable to pick a file on Angular
for some reason I am not able to pick a file.
here is my code
<button mat-stroked-button type="button" (click)="filePicker.click()" >Pick Image</button>
<...
0
votes
1
answer
861
views
ngx-pagination does not render next items when click I next, first page works fine - Angular 11
I have the following issue:
Yesterday I started following this tutorial in order to learn how to use ngx-pagination, because I needed server-side pagination.
The issue is that the first 10 items that ...
0
votes
2
answers
60
views
How can I use the data I have stored in a method after subscribe in Angular? [Angular 11]
I have the following chart, which I want to use data that I have stored in some methods, the code for context:
...
charts: any
...
constructor(
private measureService: MeasureService,
) { }
...
...
1
vote
2
answers
461
views
How to assign the length of an array to a number type variable in Angular 11?
So here is my problem, I have this going on my app.component.ts :
@Component({
selector: 'sa-app',
templateUrl: './app.component.html',
})
export class AppComponent implements OnInit, AfterViewInit {
...
0
votes
2
answers
2k
views
Angular11 update, ng2-charts, Error: Can't import the named export 'Chart' from non EcmaScript module (only default export is available)
I am currently working on updating the angular version of a project. It was v10 and I updated to v11. Fixed many errors, but ng2-charts keep throwing these errors on ng serve.
Error: node_modules/ng2-...
0
votes
2
answers
808
views
Angular Azure AD B2C Password reset policy after password changed logs into app and then shows login page
I am using Azure AD B2C with my Angular 11 application.
I am trying to use forgot password policy and it is working fine except after password is changed, it logs me into application and displays me ...
1
vote
4
answers
249
views
How to read param from the url in angular
How can I get the value of param2 based on name in angular?
http://localhost:4200/home#parma1=value1¶m2=value2¶m3=value3
Tried Below:
constructor(
private router: Router,
private route:...
0
votes
2
answers
794
views
Don't cancel the first observable if the second fails, how to keep it (forkJoin, zip). Angular 11
I have parallel API calls. How to continue getting data from one of them if second one failed?
forkJoin([a,b])
.subscribe({
next: ((data) => {
const [first, second] = data;
...
0
votes
1
answer
776
views
Show decimal numbers with condition
I have a variable with a number, sometimes it's an integer sometimes a decimal. I want to show it with 2 digits after the point once it's a decimal, and without any decimal, if it's an integer.
I mean,...
1
vote
1
answer
906
views
Angular - Click Event on Images inside of [innerHTML]
I have an application where users can write notes and, in these notes, they can include an image. Sometimes these images are large, and I have CSS that makes them fit into a container.
I am trying to ...
1
vote
0
answers
217
views
Angular 11 upgrade : aot set to true in angular.json creates issue when opening a component
I have migrated Angular from version 8 through 11 in my application.
There is a strange error where a particular component doesnot load and console throws the following error
core.js:6210 ERROR Error: ...
0
votes
1
answer
336
views
placing arrow after each responsive card
I am working on angular app. I want to have responsive dynamic cards with arrow in between each card. my code is as follows:
<div class="col-4" style="width:25%" *ngFor="...
-1
votes
1
answer
678
views
Progress bar with breaks in angular
I am working on angular app and want to have a progress bar as shown in attached image.
I have seen many progress bar online but I am not able to find progress bar of this type. How I can get ...
2
votes
2
answers
6k
views
Error: Error on worker #1: Error: Debug Failure. Unhandled SyntaxKind: Unknown
I am upgrading my Angular project from version 10.2.x to version 11. As per official angular update guide, when I run the command
ng update @angular/core@11 @angular/cli@11 --allow-dirty --force
it ...
3
votes
0
answers
3k
views
Deprecation warning createNodeArray since v4.0.0
Deprecation array warning: 'createNodeArray" has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory’ or the 'factory’ supplied by your transformation context instead.
...
0
votes
0
answers
89
views
Array in ngFor not saving
I have a button Add Educational Background that takes me to the awards input form.
<div class="col">
<button *ngIf="authService.permission('edit_user') || authService.user()...
1
vote
2
answers
7k
views
How to add a new editable row in primeng?
I want create a new editable row by default when clicking "ADD NEW button".
like below screen shot. When I click "+" button a new row will create. once I edit that row and click &...
-1
votes
1
answer
39
views
observable is not hit when there is a change in subject Angular 11
I am trying to invoke the method from another component using behaviorSubect observable concept, onBroadcastToTeamChange is hitting everytime from component 1 but i am unable to subscribe to ...
0
votes
1
answer
132
views
routelink not redirecting to child component
I have a child component that i want to add to my route outlet. But when i click nothing happens.
Here's my routelink
<li class="nav-item">
<a [routerLink]="['/student-...
0
votes
2
answers
2k
views
Angular Material elements are not known element error
I have a dashboard component in an Angular project that utilizes Angular Material elements like so:
<mat-card fxFlex fxFill>
<mat-card-title fxLayout="column" fxLayoutAlign="...
0
votes
1
answer
276
views
Datatable undefined type - Angular11
We have services.ts . Which needs 2 arguments
UPDATED
seems like i was looking the error wrong. this method was causing the console error
private checkLink(row, options) {
if (options.type ==='...