684 questions
1
vote
1
answer
93
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
59
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(...
0
votes
0
answers
60
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
...
0
votes
1
answer
650
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 (...
1
vote
1
answer
77
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
209
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 ...
0
votes
1
answer
99
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 ...
1
vote
0
answers
569
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
1
answer
57
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"...
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
1
answer
52
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>
...
0
votes
2
answers
48
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 ...
0
votes
1
answer
627
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
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]....
2
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
0
answers
72
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
2
answers
59
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,
) { }
...
...
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-...
1
vote
4
answers
240
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
1
answer
760
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
0
answers
194
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: ...
-1
votes
1
answer
666
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 ...
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.
...
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 &...
0
votes
1
answer
128
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-...