215 questions
0
votes
1
answer
120
views
Strange behavior in compiled Angular 18 application TypeError: this._serviceXXXXXXXX is not a function
We are facing strange error in our application, some users facing problems with export functionality. Code below is what we have in our codebase:
exportProcess = this.exportProcessSubject.pipe(
...
0
votes
1
answer
150
views
'FormsModule' does not appear to be an NgModule class
I am trying to import the FormsModule but i get this error
'FormsModule' does not appear to be an NgModule class.
here is my code
import { BrowserModule } from '@angular/platform-browser';
import { ...
1
vote
1
answer
112
views
ng-katex library is compatible with Angular 18?
I have this issue with ng-katex library since I installed Angular 18 on my project.
I'm not able to solve this problem but I need this library for my project.
How to make compatible "ng-katex&...
0
votes
1
answer
273
views
How do I find out what causes a "Debug Error" in TypeScript's compiler?
When running nx serve (using NRWL NX) on my TypeScript project, the build now fails with this error:
<my-file>.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/...
0
votes
0
answers
108
views
Dynamic Angular component with template from string
I have to dynamically (at runtime) create a component with template built of string. This string contains some tags that need to be replaced by Angular components.
For example
HTML template:
<div ...
0
votes
1
answer
109
views
Sharing Angular Modules with Ivy Compilation Requirement Between Two Projects
Question:
I have two separate Angular projects that share certain common modules. We've established a private GitHub NPM repository to manage these shared resources. However, one of these common ...
0
votes
2
answers
3k
views
After upgrading my application from Angular 14 to 16, I am getting 100's of errors in npm packages that I have used
I upgraded my angular application from v14 to v16.
Since there were so many peer dependencies I used --force flag to upgrade.
Now when I compile getting so many errors as shown below in screenshot.
...
6
votes
0
answers
1k
views
Fix errors to upgrade old module for Angular 16
I've been using this Modal module for my Angular projects, however today, when upgrading to Angular 16, it stoped working with this error:
'SimpleModalModule' does not appear to be an NgModule class.
...
0
votes
1
answer
4k
views
Using @ag-grid-community/angular version <28 with Angular 16
Did anyone figure out a way to use @ag-grid-community/angular version prior to Ivy support (<28) with Angular 16 ?
In Angular 16 they've removed the deprecated entry components and ngcc, so any ...
1
vote
2
answers
2k
views
angular 15 truely dynamic components with compileModuleAndAllComponentsAsync
I am in the middle of migrating of project from angular 8 to 15
The key feature of app is dynamic product cards, template for them is arbitrary html which is loaded from server and not known during ...
3
votes
2
answers
2k
views
Angular component not rendering when passed as a string in a innerHtml attribute
I use an api that returns some html. Angular components are used in the html code but not shown in the application.
How can I show an angular component when it is stored as a string?
StackBlitz demo
2
votes
1
answer
2k
views
Angular 13 Update "Duplicate identifier" Error
I am maintaining a private npm-package that provides angular-components. I am trying to update the package to angular 13 (from angular 12) and got everything to work, so I released a new version to ...
0
votes
1
answer
2k
views
Can I exclude features (routes, components...) in my Angular application during Build time depending on a env file?
I would like to have two versions of my Application with the same codebase. One Version should for example include the "registration" feature and the other one not. Can I configure Angular ...
1
vote
1
answer
538
views
Angular components loaded from different module not rendered in dynamic compiled component
Our SaaS need to offer different home pages for different customers. Our approach is to have the different templates in the database. We also have components defined in a different module that must be ...
7
votes
1
answer
8k
views
Angular "partial" vs "full" compilation mode?
Why the library compiled in the "partial" compilation mode builds so slowly inside of the consumer application, compared to the "full" compilation mode?
4
votes
0
answers
7k
views
It looks like '' has not been IVY compiled - it has no 'ɵcmp' field
I am currently using Angular 11. When I run the unit tests, all pass except one which says:
Error: It looks like 'ResultsService' has not been IVY compiled - it has no 'ɵcmp' field
I looked on the ...
2
votes
1
answer
2k
views
Angular get viewContainerRef of ViewRef
i have a definition of templates in my angular app:
<div class="wrapper" grid [data]="data">
<div class="cell" *cellDef="let cell">{{cell.id}}</...
0
votes
1
answer
521
views
ngModel value of select element as Ivy debugElement (unit test) remains empty in properties
I am currently updating an application from angular 8 to 9. When I ran my unit test after the update, a set of test failed. Particularly the ones trying to retrieve the value of the select field with ...
1
vote
0
answers
979
views
How to Access an Ancestor-Components ElementRef inside a Component/Directive
I want to access the ElementRef of an ancestor component
(which is not controlled by me; means I cannot simply expose the desired object on it).
So basically I could inject the Component itself and ...
2
votes
1
answer
1k
views
angular 13 ivy: use component html recursively ==> "The component 'x' is used in the template but importing it would create a cycle: "
I understand this error but i need help finding a solution.
Im making a CMS ui. It has a form.component.html which uses fields.component.html one of the fields is a field-set.component.html which re-...
26
votes
7
answers
34k
views
angular 13 ng build library fails (ivy partial compilation mode)
Recently I was having a problem installing an npm package (that used node-gyp). I tried upgrading the minor version of node from version 16.13.0 to 16.13.1 and upgrading my angular cli from 13.0.2 to ...
0
votes
1
answer
3k
views
Publish Angular 12 library built with ivy to npm
I have a requirement to upgrade a library to angular 12...I have done this.
Compiling this library with ivy full compilation mode succeeds but it turns out you can't publish a library compiled this ...
0
votes
1
answer
760
views
Angular 9 (Ivy): CSS class^ attribute selectors stops working with angular material components
I am currently updating an Angular project from v8 to v9, and I have discovered an issue with using CSS class attributes together with Angular Material components.
I have also updated to Material v9.
...
3
votes
1
answer
9k
views
Angular update 8 to 9: NG6002: Appears in the NgModule.imports of AppModule, but itself has errors
I've searching for an answer but could not find any solution that fix the issue.
I have updated version of Angular from version 8 to version 9. Everything worked fine on 8 but after update app does ...
5
votes
2
answers
4k
views
NG3003: Angular 12 Circular Dependency in library - Ivy partial compilationMode
I have an issue presented here.
I have a ParentComponent which has a child ChildComponent,
and child has ParentComponent inside of it so there is a cycle here.
This is the error I'm facing:
✖ ...
5
votes
1
answer
9k
views
Disabling legacy View Engine compilation mode in Angular 12
Since Angular 10, we have had the following set in an angular library:
"angularCompilerOptions": {
"enableIvy": false
}
I am now trying to use the Ivy compiler as we upgrade to ...
2
votes
1
answer
740
views
Exclude components from build using Angular Ivy
I am building two separate sites from a single angular project. I am using environment variables to keep track of the single site.
export const getHomeComponent = (): any => {
switch (...
0
votes
0
answers
2k
views
textContent/innerText/innerHTML in angular binding
I'm trying to prevent content replacing for angular app in my custom component, it happening when on custom component like <my-component></my-component> placed BOUNDED property textContent/...
0
votes
0
answers
321
views
Unable to debug code in node modules after angular 10
I have an library project and a application project which are upgraded recently to angular 12 from angular 9.
Before the upgrade when we have to temporarily change the library for debugging, we used ...
4
votes
3
answers
4k
views
Circular-Dependency with IVY partial
in a project I wanted to switch my libs to the ivy partial compilation mode (angular 12). But got now some nasty circular dependency errors:
Error from example
✖ Compiling with Angular sources in Ivy ...
2
votes
1
answer
1k
views
Angular v9 to v10 update error `Cannot add the "@Injectable" decorator to providers which don't have that decorator set.`
I'm updating an Angular library version from v9.1.13 to v10.2.5, but getting the following error: Migration failed: Could not find any tsconfig file. Cannot add the "@Injectable" decorator ...
1
vote
1
answer
415
views
Error calling (click) function inside ngIf else template
I have an *ngIf with an else template defined as such:
<button type="button" *ngIf="!paused; else resume" (click)="pause()">
pause
</button>
<ng-...
1
vote
2
answers
3k
views
How to destroy services that are programmatically injected into dynamically created angular components?
In Angular, it is possible to load and view components dynamically at runtime by calling viewContainerRef.createComponent(factory) on an instance of ViewContainerRef, passing a factory that can create ...
1
vote
2
answers
3k
views
How to compile Angular 12 library with recursive components?
Tldr: how to compile angular library with recursive components?
Prehistory: I have an application which purpose is to display complex forms. First you have to create an array of fields, then you pass ...
0
votes
0
answers
414
views
Problem with loading angular components dynamically when building with --prod option
I have an Angular application that I've recently upgraded from version 8 to version 11. Before the upgrade, everything worked fine. In this application, there are some components that are being loaded ...
1
vote
2
answers
1k
views
Angular NG3003 error when child component references parent component
Consider the following situation: A parent component uses a child component in its template, and the child component has a reference to the parent component injected into it.
parent.component.html:
&...
2
votes
2
answers
802
views
Does angular include the commented code/components also while building?
I have a few components that I do not currently, but may require it later. I know that the number of components increase the size of the build which makes the page to load slower. Does angular include ...
1
vote
0
answers
172
views
Angular 9 (without Ivy) how to get _view from ViewContainerRef?
I've a project (that was working a few days ago) that uses angular 9 without Ivy
tsconfig
{
"angularCompilerOptions": {
"enableIvy": false,
},
"compilerOptions&...
1
vote
1
answer
3k
views
Angular 10 - The target entry-point has missing dependencies:
Angular 10.2.2 version.
I have created Angular library my-lib using this page. In my library, I have devDependency on one of the internal NPM packages my-comp.web.
In my library I have imports like ...
1
vote
1
answer
137
views
What's changed in Angular 9 with respect to package import scope
I'm in the process of migrating a large V8 app to V9 and I'm experiencing errors with components that use Material components. I'm getting error NG8001: 'mat-icon' is not a known element. I fixed the ...
0
votes
1
answer
477
views
Angular component with dynamic template created using ɵcompileComponent (Angular 9) is not working in production mode
I am creating a dynamic component in Angular 9. I have a <ul> tag in the html template, the sub-elements of which are dynamically loaded from the server (The server will return values like <...
22
votes
5
answers
11k
views
TypeError: angularCompiler.getNextProgram is not a function
I'm using angular 11.2 in my machine and I want to run a angular 12 project. After clone from git, I ran below commands.
npm install
ng serve
But I got below errors and can't run the project.
I read ...
0
votes
1
answer
1k
views
Angular 11 DI for dynamically compiled components
Using JitCompilerFactory and compiling components at runtime works (for example see here: https://stackoverflow.com/a/67122569/15816951) but injecting into dynamic component does not:
// (1) define ...
0
votes
0
answers
59
views
Angular 9/10 not able to subscribe to both Params and Query Params. This was working in Angular 8 and less version
this.router.navigate(['/lp/flights/0'],{queryParams:{requestId : this.requestId}});
In app-routing.module.ts
{
path: 'lp/flights/:destcode',
loadChildren: () =>
import(
'./...
2
votes
0
answers
116
views
Ivy on hybrid apps(angular+angularjs)
Very simple question, my team has upgrade from angular 7 to 11.
I would like to know, can we enable ivy(flag:true) when our app is a hybrid app(angularjs typescipt + angular), if so what are the ...
1
vote
2
answers
2k
views
Dynamically load Angular component with dependencies
I've been looking for a clean way (without using private API) solution to a widget style dashboard. I want to dynamically load components onto it based on user role.
Is there a way to import a ...
0
votes
0
answers
494
views
angular-particle library not working angular 9 (IVY :On)
I'm trying to use angular-particle library in my angular project.
I have done the implementation according to the documentation,
imported ParticlesModule in the module file.
In HTML added
<...
1
vote
1
answer
4k
views
Angular ng build --watch seems to be broken in angular version 11
During development of angular libraries, I build the libraries on-the-fly using the ng build <lib> --watch. Setup is according to the official Angular docs at: https://angular.io/guide/creating-...
0
votes
0
answers
319
views
Angular migration from 8.1.13 to 9.1 .problem in custom library
i have some components which was working before
while going through the migration i'am facing this
so while doing the following command ng update @angular/core --migrate-only migration-v9-undecorated-...
1
vote
1
answer
363
views
Template Check not happening/Change detector not running (Angular)
Change Detection is not running in my Angular template for some reason. I am trying to change the color of the first div based on text change in second div(textbox). Here is what the code looks like:
&...