Questions tagged [angular]
Questions about Angular (not to be confused with AngularJS), the web framework from Google. Use this tag for Angular questions which are not specific to an individual version. For the older AngularJS (1.x) web framework, use the AngularJS tag.
angular
304,136
questions
0
votes
2
answers
21
views
When I navigate to the URL'http://localhost:4200/', it redirects me back
login.components.ts:
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
import {AuthService} from &...
-1
votes
0
answers
8
views
Spring Websocket CORS issue
I have a web application served by an Angular frontend and Spring Boot backend. They are deployed with a multi-stage Docker build on the same server. I had an issue of the websocket on Angular not ...
1
vote
2
answers
9k
views
Multiple File Upload Using Angular 4
I am facing issue with multiple files upload using Angular 4.
Here I am trying to append the multiple files in getFileDetails() but only file is selecting and if I choose another file it is getting ...
0
votes
0
answers
13
views
Angular 14 to 16 Upgrade : Angular 15 upgraded but not Angular 16
I am upgrading my application from Angular 14 to Angular 16. I am able to upgraded to Angular 15 (by adding couple of more libraries like "ajv": "^8.12.0",fingerprintjs.), when I ...
-1
votes
1
answer
76
views
Angular esbuild @angular/compiler missing from bundle file
I have a shell application that works with https://single-spa.js.org/docs/api/ and https://github.com/systemjs/systemjs to run its various micro-frontends.
Now I have a brand new Angular application ...
0
votes
0
answers
21
views
It doesnt always show all the books on my homepage
I am working on a Angular project. My aim is to make a book finder application using Google Books API and the problem is that sometimes when i refresh the page or I go to a different component and go ...
-4
votes
0
answers
16
views
Can anybody let me know why I'm getting this issue when I'm using PrimeNg Component in angular component [closed]
issues
node_modules/primeng/baseicon/baseicon.d.ts:13:77 - error TS2344: Type '{ label: { alias: "label"; required: false; }; spin: { alias: "spin"; required: false; }; styleClass:...
0
votes
1
answer
16
views
Firebase link existing user to anonymous account?
I have Ionic 7, Angular, Standalone app. I am currently trying to implement linking anonymous account to registered/loggedin account.
First scenario is a user who doesn't have any registered account ...
0
votes
1
answer
24
views
Download a response from httpClient to pdf file [duplicate]
Hello i have a response from my backend
headers.append('Accept', 'application/pdf')
return this.http.post(this.BASEURL + '/download', data, {headers: headers, responseType: 'blob' as 'json'});
this ...
1
vote
2
answers
25
views
Angular 17 - Trigger recurrent polling whenever a boolean variable becomes true and as long as it remains so
The situation is as follows:
I have a websocket for communication between app and server. If the websocket were to break I would like to enable backup long polling until the websocket becomes active ...
0
votes
0
answers
229
views
How to download a .stl file in angular with http.get?
I am trying to download a .stl file from a URL:- https://cdn.thingiverse.com/assets/99/39/31/f9/33/90_Degree_-_4_Segments.stl
I have created a service for the same - app-stl.service.ts, which accepts ...
0
votes
1
answer
46
views
router.navigate(['sample', 'route']) is changing url of page but control is not getting inside ngOnInit()
I recently updated my project from Angular 15 to Angular 17. Since then I have been having this issue.
When this.router.navigate(['sample', 'route']) function is triggered, the URL gets changed but ...
0
votes
0
answers
21
views
GoogleCloud Error: Not Found The requested URL was not found on this server
When I deploy Angular project to gcloud, all the pages can be loaded normally, but when I refresh the page, I will get the error as the title, or if I access it directly by typing the URL, it will be ...
0
votes
1
answer
13
views
How to make Angular understand that view child is of a specific type, not a general ElementRef?
I have an element in my HTML like this (inspiration from this blog). While the user types, I'm showing successive filtrations in a list to pick from. Once the user clicks on that component, I want to ...
2
votes
1
answer
10k
views
IONIC 3 [ERROR] An error occurred while running cordova run android (exit code 1)
i start for ionic 3, but i try to run command 'ionic cordova run android', i was try any way for solve this problem but i cannot found answer from this problem, i got error like this :
this result ...
0
votes
1
answer
13
views
Google adsense ads.txt status becomes not found Why?
I am trying to approve my angular website for google Adsense . For this i used ads.txt file which i have placed under src folder inside our angular app like src/ads.txt .But still google Adsense ...
-1
votes
1
answer
19
views
How to animate rotation of an image inside input control?
Based on this answer, I managed to put an image as my icon appearing inside an INPUT control at its right edge. If I use a GIF that rotates, I'm all set. I only need to set the class on my control and ...
0
votes
1
answer
24
views
Angular on IONOS(?) throws an error with npm
I'm trying use npm install @angular/cli to install Angular on my managed Webhosting (No root-rights) at IONOS (Germany).
I was able to install NodeJS/npm with nvm, but now every time I try to install ...
-2
votes
1
answer
32
views
Pokedex on Angular 17
I'm studying into a Boot Camp and one of past challenge was create a Pokedex with pokeapi. I over the challenge and now I'm going to fix some thinks.
I have a strange problem when I'm into details of ...
0
votes
0
answers
7
views
Ionic Angular Standalone ion-icon are not showing at all
I am using ionic 7 angular standalone but ion icons are not showing at all in web. i have also tried to add these scripts in index.html .
here is my code
<ion-row>
<ion-col size="2" ...
0
votes
2
answers
736
views
How can I add import from src folder
I have a folder _files directly inside src folder in angular application. _files folder has a json _productlist.json. I want to use _productlist.json but I am unable to add this path to import.
In ...
0
votes
1
answer
22
views
How to perform CRUD operations on a static JSON array in Angular? (without API)
I have this JSON array file.
[
{
"id": 1,
"name": "John Doe",
"email": "[email protected]",
"age": 25
},
...
0
votes
2
answers
30
views
NG8003: No directive found with exportAs 'ngForm'. [plugin angular-compiler]
I was trying to run my website, but when I try to build ng, I get this error:
Prerendered 0 static routes.
Application bundle generation failed. [5.115 seconds]
✘ [ERROR] NG8003: No directive found ...
0
votes
0
answers
7
views
vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
when I launch chrome to debug an angular 17+ app, the debugger does not work. If I refresh then it stops at main.js, if I move forward from there it debugs from there.
here is my launch configuration.
...
3
votes
1
answer
23
views
How to use PrimeNG multiselect search to trigger an API call based on user search input and populate the multiselect with the retrieved data?
When ever we enter text in the filter section, we need to call an API to get the relevant output list and update this into multiselect results.
Here I tried onFilter event to call the API, I got the ...
0
votes
1
answer
35
views
Angular - type guard not narrowing types
I have interfaces
Angular Typescript Class
interface A_DTO {
type: string,
commonProperty: string,
uniquePropertyA: string,
etc..
}
interface B_DTO {
type: string,
commonProperty: ...
0
votes
2
answers
45
views
404 for Angular app located in .NET wwwroot folder after refresh
I just create simple basic .NET Core 6 and Angular 16 applications.
I run
ng build --base-href=/ --output-path=D:\\myApp
and then I move all this build files to wwwroot folder in angular application.
...
35
votes
2
answers
24k
views
What is the difference between tick() and flush() in angular testing?
On the angular documentation I see these two functions, tick() and flush(). Both of these seem to do similar things. From the angular documentation, it says for tick:
Simulates the asynchronous ...
1
vote
1
answer
224
views
MQTT with Angular
I am trying to receive some mqtt messages in my Angular Application.
Unfortunately, it does not work.
Here is my Code (I followed this: https://sclausen.github.io/ngx-mqtt/):
In app.module.ts:
import {...
4
votes
7
answers
8k
views
Change the background color of the toast message Ionic 4
How can I change the background color of the toast message?
I have tried this: But no luck. Is that due to the shadow DOM effect?
variable.scss
--background:red;
global.scss
ion-toast>.toast-...
0
votes
1
answer
12
views
Ngrx props<>() method in createAction()
I wanted to ask that if we can give any default value in the props<>() just like we give a default value in function arguments
export const set = createAction(
'[Counter] Set',
props<{...
1
vote
3
answers
44
views
Angular 17 | Angular Material 17.3.1 Issue with styling Angular Material Menu component
I'm currently working with Angular 17 and Angular Material 17.3.1, and I'm encountering an issue with styling the Menu component. Specifically, I'm trying to adjust the height of the menu items, but ...
0
votes
0
answers
32
views
Angular 16 sending null values to API
I'm trying to send an object to my api but i always get null values.
Here is my angular method:
createNormalPost(post: CreateNormalPostInterface) {
const formData = 'ceasdasdas'
return this....
-2
votes
0
answers
15
views
Detecting click inside and outside of the listening component in Angular
I have a search box and show a filterable list of matching elements in a DIV that hovers over the other components. Once the user selects something, the DIV is hidden. This part works as supposed to. ...
0
votes
0
answers
30
views
Undo/Redo in Angular
I'm using Angular 7 for a system I'm building. And now i need to add an Undo/Redo feature to this application. What I'm looking for is, what are the best practices I should follow to do this? Do I ...
1
vote
1
answer
1k
views
How to toggle Admin LTE 3 sidebar manually in angular12?
I have implemented Admin LTE 3 theme in my project and implemented.
layout.html
<div class="wrapper w-100">
<!-- Navbar -->
<app-header></app-header>
<!-- /.navbar ...
2
votes
1
answer
591
views
ionic2 - The generate command is only available for projects that use ionic-angular >= 3.0.0
When I generate a project page, error coming, but still can generate this page.
-1
votes
0
answers
8
views
In node_modules file i am getting Angular genric error while using fontawesome in angular12
Generic type 'ɵɵComponentDeclaration' requires 7 type argument(s).
18 static ɵcmp: i0.ɵɵComponentDeclaration<FaStackComponent, "fa-stack", never, { "size": "size"; ...
6
votes
4
answers
7k
views
Typescript - variables declaration
I'm not sure if this is the place for this question, but I've been told code review is not the place for it.
I'm just learning Angular 2 and Typescript, so am working through this following tutorial:
...
1
vote
2
answers
34
views
Angular / Firebase : Error when deploying simple project
When deploying with ng deploy or firebase deploy, I encounter the following error:
Error: Your project must be on the Blaze (pay-as-you-go) plan to complete this command. Required API ...
0
votes
1
answer
815
views
Unable to start Angular 2 project
I don't know what happened, but for some reason all of a suddent I can't start my Angular 2 project anymore and I can't figure out why based on the error.....
node_modules/@types/core-js/index.d.ts(...
0
votes
1
answer
23
views
Why does Angular ^17 have problems with my modules, services, etc
Perhaps it was already somewhere in the themes. But I couldn't find a similar question. And the question is why Angular can't find modules and services. I create through "ng g", it seems ...
1
vote
2
answers
51
views
Convert String UTC Date to number for ngx-countdown leftTime config value
I'm calling a C# API that's returning the following types to my Angular application.
export interface Auction {
reservePrice: number
currentHighBid: number
auctionEnd: ...
0
votes
3
answers
1k
views
Why is the event target the select element rather than the option selected?
Using angular 11 and trying to get the value of the option element when I select an option. I've looked at probably 20 docs / so answers that say to do this:
html:
<select class="ui-select ...
0
votes
1
answer
22
views
Why DOCTYPE is required in HTML(ANGULAR)?
If in Angular with AOT , all typescript, HTML and CSS code gets converted into JS after complication, then why we need to mention DOCTYPE in HTML?
0
votes
0
answers
23
views
NullInjectorError: No provider for Firestore with Angular
Using Angular and Angular cli: 16.2.12 Firebase: 13.5.2, I get this error:
NullInjectorError: R3InjectorError(Standalone[AddEditComponent])[DataService -> DataService -> DataService -> ...
3
votes
2
answers
1k
views
Could not find the project main file inside of the workspace config (src)
I started a personal project that using angular 17 in front-side and decided to use ngx-bootstrap. Ngx-bootstrap released a version([email protected]) compatible with angular 17. But I got an error ...
3
votes
1
answer
116
views
Angular 16: CSRF config: can I still use the HttpXsrfInterceptor and HttpXsrfCookieExtractor classes? Intelli-J says they are not existing
In this excellent article on CSRF configuration for Angular, two options are described for the CSRF config:
First: use the default Csrf config:
providers: [
{ provide: HTTP_INTERCEPTORS, useExisting: *...
9
votes
3
answers
10k
views
How to post multipart/form-data from Angular to Nodejs Multer?
From Angular I want to upload a image as Blob data to nodeJS server. The server uses multer in the backend. The image file is generated by canvas render. I am getting the following error from the ...
0
votes
1
answer
29
views
Sending multiple images and data in a single angular observable
I am attempting to send multiple images and data within the same observable. I conducted some research, but all I found was information on how to send a single file. My API is prepared to accept ...