X Tutup
The Wayback Machine - https://web.archive.org/web/20221123154940/https://gitter.im/angular/angular

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ammar Gomaa
@ammargomaa1
Hello everyone, I'm having an issue that cracked my head,
"angular-mentions/fesm2015/angular-mentions.mjs: This application depends upon a library published using Angular version 14.0.6, which requires Angular version 14.0.0 or newer to work correctly."
my angular cli version 12
and my angular version is 12
gitexp2050
@gitexp2050

I'm new beginner in java and have a assignment to do heap and thread dump analysis and find out the bug and exact root cause..basically a demo to be shown

Can someone guide me where i can get some samples of Thread and Heap Dump with issues, steps to find the actual issue or root cause in the dumps ?

Bug identification with thread dump and heap dump which has issues.

keeshii
@keeshii:matrix.org
[m]
Java or java-script?
gitexp2050
@gitexp2050
java
buzz-dee
@buzz-dee:tchncs.de
[m]
@gitexp2050: then you are in the wrong room. this is about angular
gopalsai
@gopalsai
Hi Angular, does NVD3 js or D3.js work with Angular 13 or 14 version built Apps ? I’m thinking there should be no issues. We are rewriting Angular js App to Latest stable Angular version It’s been hard to find an example with Angular 13 or 14 version. Can someone please confirm ? Thank you
Arun-Dhananjeyan
@Arun-Dhananjeyan

Hello Everyone,

Recently we have to change our CI/CD setup of our angular application, as part of that we have modified two option in build process, named-chunks to TRUE and Hash value to NONE. Due to this lazy loading chunks name will remain same as module file name.

ng build --configuration production --aot=true --build-optimizer=true --output-hashing=none --named-chunks=true

As the result of above configuration we have few questions which is listed below,

  1. Is named chunks option is advisable to use in production ?
  2. Exposing module file name along with its file path as chunk name will cause any security issues ?
  3. Using named chunk without has value will cause any cache issue. If YES, will there is a way to resolve it ?
  4. Is there any other way to provide custom name to chunks ?

Thanks in Advance

Manpreet Singh
@singhmp2k
how to create a angular cli project with javascript instead of type script ?
hi, how to create a angular cli project with javascript instead of type script ? it has been long time i didnt work on angular and recently i have started again. i knew that there was a flag that change the settings in project when we run ng new <PROJECT-NAME> command but with latest version im not able to find that settings.
panisovinova
@panisovinova_twitter
Hi there!
Maybe someone has experience in typeahedMultipleSearch inn ngx-bootstrap?
I want to search items separated by commas, and get item via http.get request, but, unfortunately , it doesn’t work(
Mazhar
@speakingsoul_twitter
I have upgraded from Angular 8 - 9, In my project I had extend MatDialog class and written _createInjector and _attachDialogContainer functions. Ever since I have upgraded to 9, after adding @Injectable() the code is complaining since _createInjector and attachDialogContainer methods are private in base class. I have search all over but couldn't find a solution
gitexp2050
@gitexp2050

I come across a beautiful example - https://github.com/Nozbe/WatermelonDB/tree/master/examples and wanted to run this application example

How to run this node js application ? Can someone try and help me with the steps

The demo URL provided in the link https://github.com/Nozbe/WatermelonDB and https://watermelondb.now.sh/ is not working and followed the instructions given in https://nozbe.github.io/WatermelonDB/Demo.html#running-react-native-demo .

sbreed
@sbreed

Ugh... it's been a while since working with Angular.
If I have the following Angular code:

<input type="text" #inp>
<p>{{ inp.value }}</p>

Shouldn't the paragraph update the text DYNAMICALLY when I start typing in the input?

2 replies
TiagoCatarino
@TiagoCatarino

I got the following code:

@ Output() varEvent = new EventEmitter<any>();

.

.

.

this.someService.addToDb(request).subscribe(()=>{

this.varEvent.emit();

});

I am trying to trigger a function in the parent component after the new data is posted successfully to the database, but for some reason the eventEmitter variable (in the child component) does not work inside the subscribe. If I place it right after the subscribe, it works, but then I can't be sure if it happens right after the subscribe.
I have scrapped google for issues of this type, but could not find a single one.
Any clues to why the emit does not work inside the subscribe and how I can make sure it only emits after the subscribe has completed successfully ?

acer
@acer:mozilla.org
[m]
Hello. Is there a way to insert elements between certain items for *ngFor let of?
1 reply
DumbstruckBlu
@clockmaster:matrix.org
[m]
Hello I need a help an error I am trying to use @apply inside style.scss but it is giving me an error
./src/styles.scss - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Expected a pseudo-class or pseudo-element.
    at C:\Projects\Test_projects\ng-todos\src\styles.scss:9:3
    at Root._error (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:174:16)
    at Root.error (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\selectors\root.js:43:19)       
    at Parser.error (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:740:21)
    at Parser.expected (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:1133:19)        
    at Parser.pseudo (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:875:19)
    at Parser.parse (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:1084:14)
    at Parser.loop (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:1043:12)
    at new Parser (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\parser.js:164:10)
    at Processor._root (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\processor.js:53:18)       
    at Processor._runSync (C:\Projects\Test_projects\ng-todos\node_modules\postcss-selector-parser\dist\processor.js:100:21)   
    at processResult (C:\Projects\Test_projects\ng-todos\node_modules\webpack\lib\NormalModule.js:713:19)
    at C:\Projects\Test_projects\ng-todos\node_modules\webpack\lib\NormalModule.js:819:5
    at C:\Projects\Test_projects\ng-todos\node_modules\loader-runner\lib\LoaderRunner.js:400:11
    at C:\Projects\Test_projects\ng-todos\node_modules\loader-runner\lib\LoaderRunner.js:252:18
    at context.callback (C:\Projects\Test_projects\ng-todos\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
    at Object.loader (C:\Projects\Test_projects\ng-todos\node_modules\postcss-loader\dist\index.js:142:7)
DumbstruckBlu
@clockmaster:matrix.org
[m]

I am using tailwind css version 2.2.19 with Angular 12 and scss

My style.scss

@tailwind base;
@tailwind components;
@tailwind utilities;

.btn {
    @apply px-8 p-4 py-2 rounded text-white font-semibold;
}

.blue {
    @apply bg-blue-400 hover: bg-blue-500;
}

When I use the classes in html directly it gives me no error but when use @apply it gives above error and fails to compile.

8 replies
I followed the tailwind css documentation to add tailwind
DumbstruckBlu
@clockmaster:matrix.org
[m]
How will I add tailwind's classes in this?
2 replies
DumbstruckBlu
@clockmaster:matrix.org
[m]

thanks fanavity

.btn {
@apply px-8 p-4 py-2 rounded text-white font-semibold;
}

.blue {
@apply bg-blue-400;
}

.blue:hover {
@apply bg-blue-500;
}

this worked
I was using the hover class wrong
sbreed
@sbreed
Is it possible to use Reactive Forms with a binding? I need to change the display of a <div> depending on the selected option of a <select>, but that select is already bound by the 'formControlName.' When I try to add an [(ngModel)], it complains.
Rob
@borriej

hi :wave:

how do i read the innerHTML from a ContentChild?

Example, my app-custom-component has a ContentChild #actionsMoreMenu…

<app-custom-component>
          <ng-template #actionsMoreMenu
                       let-row="row"
                       let-i="i"
                       let-dropdown="dropdown">
            <li></li>
            <li *userRight="deleteRight;module:module">
            </li>
          </ng-template>
</app-custom-component>

In my component i have

  @ContentChild('actionsMoreMenu') actionsMoreMenu: TemplateRef<any>;
  ngAfterContentInit(): void {
    // check if action more menus has items
    console.log(this.actionsMoreMenu);
  }

But i cant read the HTML from the elementRef.nativeElement

1 reply
Hootlook
@Hootlook
image.png
sbreed
@sbreed
Is it possible to easily POST a FormGroup using the HttpClient? I found other solutions, but it requires creating a FormData instance and iterating over each member in the FormGroup, appending it to the the FormData.
1 reply
That is, I'm posting as multipart/form-data and not JSON.
parween07
@parween07
Hi, I have a question from angular. How to add yaml file in angular?
parween07
@parween07
Hi, I have another question. I have two drive like D and F one(F) having images another(D) having angular project. How to add images in angular project without using any assets folder. please help me
arehman21011519-145
@arehman21011519-145
Hi, I've question: I'll be very thankful if someone answer
My answer details are here: https://stackoverflow.com/questions/74408309/need-help-route-params-in-angular-14
Looking forward to reponse.
Thanks a lot.
arehman21011519-145
@arehman21011519-145

Hi, I've question: I'll be very thankful if someone answer
My answer details are here: https://stackoverflow.com/questions/74408309/need-help-route-params-in-angular-14
Looking forward to reponse.
Thanks a lot.

??

Emilio Barrientos
@eaemilio
Hi y’all, I have an AngularJS application being built with webpack and then being served by an IIS app Pool, I’m upgrading it to angular 14 with a hybrid approach (angular/angularjs), I’m using @ngtools/webpack to compile ts files, but I’m getting this after webpack’s build, any ideas?
CleanShot 2022-11-14 at 12.53.59.png
mjnd88
@mjnd88

hello friends

I'm using scapy what is the difference between : padding() and nzpadding() i get the same result from both functions i don't know where the difference is

Giddings
@Gashindu
export class UserItemComponent {@Input() name: string
Jarosław Wróblewski
@jarwr
Hi! is there any way to inject a tracking script (I don't want to embed it directly in index.html) into index.html?
gitexp2050
@gitexp2050
can anyone help me with a javascript clarification? please kindly ping me
Aakash Giri
@0APOCALYPSE0

CanDeactivate Guard not hiding URL in browser window on cancelling navigation

I am using the skipLocationChange property with true value so I can hide the URL in the browser. It is working fine. But for one of my features, I am using CanDeactivate guard so I can warn the user to save changes before leaving the current page. I am just displaying one pop-up to take confirmation from the user. If the user clicks on "OK" then he is navigating to the target page without any issue also the URL is also hidden in the browser. But If the user clicks on the "Cancel" button then he is staying on the same page but the problem is here current page URL is getting appended to the base URL in the browser. Which I don't want. I just want the URL to be hidden with the cancel case too.

I am also attaching the link to a sample project created using stackblitz: https://stackblitz.com/edit/angular-ivy-uqq8sg?file=src/app/app.component.html

Steps to produce an issue in the sample project:

Open the user-details page by clicking on the user-details link.
Fill out the user details form and click on the page-one link then it will show a confirmation window click on cancel.
The user will stay on the same page but it will also append the user-details URL in the browser.
Thanks in advance.

Omid Dehghan
@odehghan
Hi folks! :)
I'm trying to run an AJAX request (from the browser to a server). Now while in Firefox I'm getting the value true when calling the lengthComputable property, I get the value false when running the same code in Chrome.
Does anyone know what's going on? What am I missing here?
Omid Dehghan
@odehghan
BTW, I get the same values when calling the total and loaded properties in both Firefox and Chrome.
Oh and the content-encoding header of the document I'm getting from the server is set to gzip. I read a peice of content in the StackOverFlow mentioning that if the encoding is gzip, Chrome will set the value of the lengthComputable to false for some reasons...
Is this true?
Matt Erman
@CodeLiftSleep
So I have an embedded microfront end in a parent application...both are created in Angular, is there an Angular implementation of window level CustomEvents that can be used? I have it working with the window javascript customEvents, just wondering if there is more of an "Angular" way of doing it. Note @Input/@Output is not an option as the embedded application is a root component. Basically need to pass data from the parent application to the embedded application.
Prem Ranjan Shaw
@premshaw-coder
Can any one tell me is it necessary to unsubscribe to https calls if I subscribed them ? As I know http calls are executed once and when it stop it executes the complete method in the subscribe
ahmed mechergui
@farestayari

hello everyone, i have a question related to FormBuilder, i have a form generated dynamically with a + button, i want to display the form informations when i fetch the data from the server.
i have this in the creation page

   locataire: this.formBuilder.array([]),
  createTenant(): FormGroup {
    return this.formBuilder.group({
      prenomLoca: [''],
      nomLoca: [''],
      mailLoca: [''],
      telLoca: [''],
      newAdrLoca: ['']
    });
  }
  get locataire(): FormArray {
    return this.formProperty.get('locataire') as FormArray;
  }
  addTenantToFormArray(): void {
    this.locataire.push(this.createTenant());

    if (this.locataire.length === 4) {
      this.presentToastErrorMessage();
    }
  }

i tried this in the edit form but it did not work

      locataire: this.formBuilder.array([
          this.infos?.locataire[0] || [],
          this.infos?.locataire[1] || [],
          this.infos?.locataire[2] || [],
          this.infos?.locataire[3] || [],
      ]),
X Tutup