Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Haaris M
container component with 2 forms
ngOnInit() {
        this.selectorForm = this.myService.toFormGroup(
                .selectorFormField$ as unknown) as FormFieldBase<string>[]
        this.selectorForm.valueChanges.subscribe((selection) => {
            this.selectedType = selection[resourceTypeSelectorKey];
            this.selectedItem = this.myService.getItem(
            this.configurationFormFields$ = this.myService.getConfigurationFormFields(

            this.configuratonForm = this.myService.toFormGroup(
                    .configurationFormFields$ as unknown) as FormFieldBase<string>[]
Haaris M

After a value change in one input (not wrapped in form) a variable is set and the corresponding div section with ngIf renders a <form>

happens even when 2 different sibling forms with no common ancestor.
Is the issue when control groups are not wrapped in formGroupName by has its own formGroup

Hi, quick question for angular application routing, how do I set parameterized queries for the url? Any reference material I can read? I have an SPA app.
1 reply
Jim Lynch
can, can anyone pls halp. ngrx seems to be not working right for me. I posted a question in the ngrx/store channel. thanks!
Hi there.Can anyone share some reference link for angular PWA
We have an angular app with ngrx/store running against a significant REST API backend. We have started building also some GraphlQL APIs hence we will have a mixture. Would you recommend moving away from ngrx/store and move to apollo-client? Is using appollo against a REST backend a good idea?
@mohammadzbggo what do you mean by expect(responder.locals.context.recordingId).to.equal("recordingId"); ?

@sanket-thotange just CTRL+C then restart ng serve

I tried the same. I think its the issue with incorrect angular upgrade that I did.

Is is necessary to use OnDestroy hook in app.component to unsubscribe from subscriptions?
Is there a way to use "let-" syntax with complex objects? Say I have the default context going into let-data and I would like another one which reaches in to data. So I would want something like let-two="data?.one?.two". Or is even better, being able to skip the let-data entirely and have let-two="context?.one?.two"?
Doaa Othman
Please I want to pass index of element in ngfor to other how can I do that
@DoaaOthman *ngFor="let item of myArray; let i = index" <= i will contain your index
Hi there.Anyone one here worked on index db to store data offline and sync the data once the application is online
Doaa Othman

@BertrandMarechal I mean like this

<ul><li *ngFor="let item of myArray; let i = index”>{{item}}</li></ul>


<ng-container *ngFor="let item1 of myArray; let j= index””>

<li *ngif=“j==i”>{{item1}}</li></ng-container> </ul>
l have two ul I want to appear second li according to check if there index equal or not

not sure you can if the element you want to pass it to is not a child of the one having the index as i
you may have to rework your logic
ishu mishra
Hi All
 for(let i=0;i<isodetail.length;i++){
    <input type="radio" id=${isodetail[i].iso} name="radio" value=${isodetail[i].iso} ${onchange="radioCall(isodetail[i].iso)"}>
  <label for=${isodetail[i].iso}> above ${isodetail[i].iso} %</label><br>
i am trying to create 3 radio buttons with labels and attaching onchange method
i think i am doing something wrong
as its showing only last value from array
Well your code overwrites the innerHtml with the value you pass every time, so it will always put the value from the latest element in the array
why not using ngFor ?
How to setup Cors policy in angular/alfresco while calling alfresco share Rest Api in angular don't end?

Please take note of following points that was already tried out:

Alfresco(exposed at localhost:8088) :Have configured filter for tomcat(in Alfresco) as in this post AngularJS / Alfresco / CORS filter issue: No 'Access-Control-Allow-Origin' header

Angular(exposed at localhost:4200) : Have setup application to work with proxy to access 8088 https://levelup.gitconnected.com/fixing-cors-errors-with-angular-cli-proxy-e5e0ef143f85

After trying both still get the CORS error as following: Access to XMLHttpRequest at 'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Any suggestions ??

Miloš Lapiš
@justinmgeorge Simply config your server-side that it adds the following headers to each response:
header('Access-Control-Allow-Origin: *'); 
header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, OPTIONS');
Amit Sahoo
Hi, I have a table which has invoice details ->
It can spread over multiple pages while printing. I am using ngxPrint for printing.
My requirement is when multiple page will be there then all page should have subtotal. How can I achieve this? Please help
Vikas Dulgunde
hi all, i want to send a telegram message using my own account with javascript code! can anyone help me please?
Goutam Kumar Dhandh
you should use telegram API link :https://core.telegram.org/
They Use WASM instead of Rest call @vikasdc
howdee. i'm the fool use case who doesn't understand how to deploy angular build output for a component only. the use case is i want to write not a full angular app with routing, and services in the root, but entirely self contained modules i can distribute from package management and consumers can just deploy the javascript file and get fancy PART OF THE ui generated by angular.
please advise
when writing distributable modules i suppose i want to confirm whether or not the development environment MUST be initialized with the equivalent of ng new ng-dev-environment-for-building-components
Hi everyone, I am thinking about the best way to smoothly scroll in to a position. Th scrollintoview method is nice, but its not completely cross-browser compatible and angular's viewportScroller doesn't appear to have the ability of smoth scrolling or any sort of animation. Any ideas where to start from?
Anyone know how to create something like google docs' comments and suggestions using angular material? I've got the basic format of the mat-card down just not sure how to handle how to do the layout of each card
Anyone knows how to integrate angular pwa in asp.net mvc
service-worker.js:702 Service worker registration failed with: TypeError: Failed to register a ServiceWorker for scope ('http://localhost/') with script ('http://localhost/ngsw-worker.js'): A bad HTTP response code (404) was received when fetching the script.
I am getting error.Can anyone knows how to resolve it
Is there an agreed upon way how to best do server-to-client notifications (Springboot to Angular) these days?
hey people, Is it possible to get the value of var inside component(in angular not in test) from protractor in e2e? Like count:number =2; I need to know in test what's the value in this var, is it possible?
Hellow everyone
need one help on unit test
onChange(indexes: number[]): void {
Iif (indexes[0]) {
this.sliderLeftArrow = false;
this.sliderRightArrow = true;
} else {
this.sliderLeftArrow = true;
this.sliderRightArrow = false;
how to cover if statement in jasmine
Does any one have issue after move to angular 12
from Css Minimizer
Error: Unexpected '/'. Escaping special characters with \ may help.
it showing 500 error in css files
HI everyone, How can I generate angular documentation after apply any markup described in https://angular.io/guide/docs-style-guide page??? Y understand how to use <code-tabs> and <code-pane> for example, but i can't find how to generate doc after that.
Amit Sahoo

I am using valueChanges to track a form control. This works just fine. But when I am passing the same FormGroup through router and setting the values, this event is not triggered.

  ngOnInit(): void {
    this.clientService.getAllClients().subscribe(data => {
      this.clientDetails = data;

    this.billingClientForm.get("clientName").valueChanges.subscribe(() => {

constructor(private fb: FormBuilder, private clientService: ClientsService, private router: Router
  ) {
    const value = this.router.getCurrentNavigation().extras.state?.client;

  onClick(result: Client) {
    this.showDropdown = false;
    this.showClientDetails = true;

  setBillingClientForm(result: Client) {
    // this.billingClientForm.get('isActive').setValue(result.isActive);

Router Code :

this.router.navigate(['new-bill'], { state: { client: this.client } });

Can anyone suggest what is the issue here?

Renee Thomsen
Wrong link earlier. Below is the edit link.
My question is: how to display the buttons that trigger pop-up message within an ag-grid cell? The error message I have now says Class constructor ButtonRenderer cannot be invoked without 'new'
Luke Crooks
Hi, I am trying to fix a third party library, I have forked the code and have updated it locally on my machine, how do I then get angular to install this local version of my changes, build the library to update my packages node_modules with the newly updated code so I can test it?