103 questions
1
vote
4
answers
90
views
How to add a new row every nth loop in Angular @for?
I want to create a new row every 6 iterations of a loop, but because I have a div tag in an if with no closing div, I'm getting an error.
What is the correct, "Angular 19" way to do this?
&...
5
votes
2
answers
3k
views
How to get rid of "Imports array contains unused imports(-998113)"
Ever since I've upgraded my app to the latest version of Angular (18.2.0), I'm getting this warning message in many of the components:
Imports array contains unused imports(-998113)
Now, I ...
0
votes
2
answers
1k
views
Angular 18 -- Error: The injectable 'Http2' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available
I am upgrading an old project of mine from Angular ~7 to ~18. After fixing ALL the TS warnings and errors, the project compiles successfully. However, when I run npm start and hit localhost:4200 I am ...
1
vote
0
answers
460
views
Error: The injectable 'PlatformLoaction' needs to be compiled using the JIT compiler, but '@angular/compiler's is not available
I was updating my Angular version from 10 to 15 and encountered an error while running the application..
Ideally, the Library is processed using the Angular Linker to become fully AOT compiled.
...
0
votes
0
answers
126
views
Is a way to debug angular aot compiler?
Windows 11, Angular branch 17.3.x. I build angular from official repository. It is ok. Then I try to debug angular aot compiler (not application). I follow instructions https://github.com/angular/...
0
votes
1
answer
902
views
Angular compiler-cli error: Namespace 'ts' has no exported member 'ResolutionMode'
I am developing a web application with Angular 16 in Webstorm. The web application is currently pre-release and only has a small portion of minimum functionality completed. I was editing with ng ...
-1
votes
1
answer
208
views
Compile Module dynamically with providers in Angular 14
I need to create a module with a composite of submodules that represents minimum required imports for my package to work. This composite of modules depends on external config, and i want to compile ...
0
votes
1
answer
41
views
Does the Angular Compiler optimize string expressions?
I have the following code snippet:
"foo".length > 0 ? true : false;
Does the Angular compiler replace it just with true?
tsc does not do; I tried it out.
0
votes
1
answer
3k
views
Angular - 8 - Trouble with npm-install - Error
after moving my App to another computer I have trouble with runing npm-install. Here is a content of my package.json:
{
"name": "lunaticgodsinfo",
"version": "0....
0
votes
0
answers
335
views
Do I need -moz- and -webkit- in an angular project or does angular compile the css to a format readable by any browser?
I know Angular compiles code and serves it as html, javascript and css. So my question is: Do I need -moz- and -webkit- in an angular project or does angular compile the css to a format readable by ...
3
votes
1
answer
4k
views
Nx build - Another process, with id xxx, is currently running ngcc
I have a Nx monorepo that contains 2 projects. When I build these projects locally everything works as expected, but when I try to build the same projects on the build server I get the error
Another ...
0
votes
1
answer
1k
views
Angular: Overriding DatePipe in node_module components
Problem: I have an external library in my angular app with components. Some of this components use Angular DatePipe internally to transform dates in the 'shortDate' format. I don't really have the ...
4
votes
3
answers
2k
views
Cannot read property 'text' of undefined at NodeObject.getText at getRequiredModulePath
Error occurs while generating browser application bundles (phase: setup).
What can cause this error?
Info from console:
Generating browser application bundles (phase: setup)...
TypeError: Cannot read ...
0
votes
1
answer
265
views
Can't bind to "attribute" && "app-component" isn't a known element
I've a HUGE problem. The entire thing started with this: Fix corrupted HTML file or decompile Angular Component
My PC suddently crashed and from that event it become worse every second. I get weird ...
102
votes
12
answers
260k
views
Could not resolve dependency: npm ERR! peer @angular/compiler@"11.2.8"
I am trying to get my app to deploy on Heroku. I was getting the "sh: 1: ng: not found" error but based on responses on here, I moved my @angular/cli, @angular-devkit/build-angular, @angular/...
0
votes
0
answers
111
views
How export @ptkdev/webcomponent-instagram-widget in Angular module?
I'm just trying to export '@ptkdev/webcomponent-instagram-widget' in Angular module, but I don't know how. I have tried everything.
Do you have an idea?
The component is working, but when I compile ...
0
votes
0
answers
200
views
Edit typescript before angular compiler
I want to strip a ts code before angular compiler.
Here is how it looks like before the compilation:
...
/* prod:start */
const title: string = "Production title!"
/* prod:end */
/* dev:...
6
votes
2
answers
2k
views
Dynamically compiled lazy loaded dynamic routes in Angular causing 'unsafe-eval' error
In the index.html file of the angular application after applying the Content Security Policy, the application is giving 'unsafe-eval' console error as below -
core.js:4442 ERROR Error: Uncaught (in ...
3
votes
0
answers
1k
views
How to use file replacements in Angular 10
I am working on a project, and as far as I can tell; when running "ng run build --prod" the file replacements are not working.
This is important as I want to remove the NgRx devtools when ...
0
votes
2
answers
2k
views
Configuring angular production files after build
I have an angular 9 project which is part of an application suite installer [Wix installer]. One of the settings used by the angular app is the address of API which it fetches its data from some ...
5
votes
1
answer
3k
views
How to compile runtime-generated Angular8 code?
I'm creating Angular code at runtime, in particular, I use a SVG library in order to create a vector graphic that contains Angular code directives like (click)='myMethod()', which, in turn, call ...
0
votes
1
answer
1k
views
Angular: library upgrate to Angular9 with ngcc build error for the demo-app
I'm maintaining an Angular library, which is generated by Angular Cli. Inside the workspace there is a library and a demo-app, which is a standard architecture for all of Angular libray created from ...
3
votes
1
answer
2k
views
Pass data to dynamically created angular modules and components
I need to pass data to a dynamically created angular module like an id or JSON my controller code is like this.
Logic Explained - The API provides the layout of the page if primary module comes ...
3
votes
1
answer
566
views
Angular 7 SCSS Doesn't Keep CSS Custom Properties
I'm trying to use CSS Custom properties in my Angular 7 app but am running into issues where building down to css gets rid of the property that is set to a CSS variable.
SCSS
:root {
--my-test-var:...
1
vote
2
answers
5k
views
Why cant my Angular CLI find module '@angular/compiler-cli/ngcc'?
After successfully installing the PWA component in order to make my Angular app a Progressive Web Application via ng add @angular/pwa --project myProjectName, I cant seem to fire up my app any more.
...