45 questions
0
votes
2
answers
354
views
Not able to serve my angular app after upgrading from Angular 8 to 9
My angular project is currently running in Angular 8 and I use HeroDevs\Hero-Loader (https://www.npmjs.com/package/@herodevs/hero-loader/v/2.0.1) for lazy loading of modules for a page containing tabs....
0
votes
1
answer
682
views
configuring custom path for ngcc in angular project
I am having a requirement where node_modules required for a project are already installed and stored somewhere.
And we are running multiple instances of the angular project each inside a separate ...
0
votes
1
answer
5k
views
an issue of installing ngx-bootstrap with Angular 14 (Package "ngx-bootstrap" was found but does not support schematics)
I'm having a problem install ngx-bootstrap with angular 14
the package.json as follows:
{
"name": "testproj",
"version": "0.0.0",
"scripts": {
...
3
votes
1
answer
10k
views
ERROR Error: Angular JIT compilation failed: '@angular/compiler' not loaded
The Error I got suddenly while running my app in a development environment using VSCode,
main.js:7740 ERROR Error: Angular JIT compilation failed: '@angular/compiler' not loaded!
- JIT ...
1
vote
1
answer
1k
views
Angualar 10 : Add descritpion (*d.ts) file manually to compilation
I have a angular library which has the description files *.d.ts. in a below structure
├ src
│ ├ my-lib
│ │ ├ my-typedef.d.ts
│ │
│ │
│ └public_apit.ts
│
└ tsconfig.lib.json
On tsconfig....
0
votes
0
answers
274
views
Angular CLI and react JavaScript run in same project how to make it possible
This is my package.json file if I want to run both Angular CLI 10 and reactjs in same platform how can I make it possible. It should be possible because both background is same if we menu-plate router ...
0
votes
1
answer
892
views
HTML, SCSS not compiled on save - Angular 11.0.2
I upgraded my app to Angular cli ^11.0.2 recently, from then my HTML and SCSS changes are not compiled on save even when ng serve is running. I have to save the respective ts file to get the html ...
2
votes
0
answers
227
views
Angular Library Debugging - WebStorm
We have created our own angular library and published those artifacts in AWS CodeArtifact.
Those 2 artifacts we are importing into another project.I would like to debug those 2 libraries and want to ...
0
votes
1
answer
609
views
MatTableDataSource from another component
I have two components, Order and OrderDetail.
In Order I have a MatTableDataSource, which is filled from a service.
OrderComponent
before contructor
listData: MatTableDataSource<DocumentDetailModel&...
0
votes
1
answer
2k
views
Pass data to Service from main.ts file in Angular application
I have a main.ts file in my Angular CLI application which contains the following export..
By the way, it's a microservice which gets CONTEXT from another microservice
export default {
async mount({...
0
votes
1
answer
105
views
Issue while installing angular cli on stable node version
Facing an issue while Installing Angular CLI.
Tried all the possible workaround like clearing cache, uninstalling, and reinstalling Node. Manually clearing folder of npm-cache in Appdata.
The attached ...
0
votes
3
answers
884
views
Corrupted file - .xml2js.DELETE/package,json in node_modules within an Angular project
Errors began after updating to Angular-Cli V10.1.0.
Initial problems I encountered:
The ng command was not working. I found that core dependencies were missing:
npm WARN @angular/[email protected] requires ...
0
votes
1
answer
833
views
error after updating Angular cli from 8 to 10
I have upgraded my Angular project from 8 to 10 but while compiling I am getting the following error.
ERROR in node_modules/ngx-loading/lib/ngx-loading.module.d.ts:4:55 - error TS2314: Generic type '...
0
votes
0
answers
644
views
error TS2722: Cannot invoke an object which is possibly 'undefined'
Description
IN angular 10, below is my ts-config.
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/...
0
votes
1
answer
2k
views
core.js:4197 ERROR TypeError: Cannot call a class as a function
While serving the Angular application, getting below console error in Angular v10
core.js:4197 ERROR TypeError: Cannot call a class as a function
at _classCallCheck (classCallCheck.js:3)
at ...
0
votes
1
answer
653
views
While importing scss file into parent class css not working properly
Below is my scss file
.mat {
@import "ej2-base/styles/material.scss";
@import "ej2-buttons/styles/material.scss";
@import "ej2-popups/styles/material.scss";
@import "...
8
votes
1
answer
11k
views
es5BrowserSupport by Angular
I have updated my Angular CLI, with version 10.0.5 (globally and locally both) And while I am trying to build my angular project by below command-
ng build
I am getting below error-
Schema ...
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 ...
1
vote
2
answers
1k
views
Angular 9: how to focus in mat-input when key press anykey
How to focus in mat-input when key press any key on keyboard.
have tried:
@HostListener('document:keydown', ['this.search.nativeElement.focus()'])
0
votes
1
answer
2k
views
Angular 9: how to disable ios mobile browser double tap zooming
Angular 9: how to disabled ios mobile browser double tap zooming.
have tried:
<meta name="viewport" content="width=device-width, , initial-scale=1, maximum-scale=1, user-scalable=no, ...
-1
votes
1
answer
301
views
How can I add external JS file in Angular CLI component, specific to the component only?
I have components Home and About in Angular CLI app. I have included the javascript file required for both components in angular.json. But I want to add component-specific javascript files in the ...
7
votes
4
answers
22k
views
Angular 9 with jsPDF module : Type 'typeof jsPDF' has no construct signatures
Angular 9
Module which has issue jsPDF (installed types + packages itself)
When doing ng serve it works
When doing ng build --prod , it has errors
ERROR in src/app/xxx/xxxx.componentomponent.ts:52:27 -...
0
votes
3
answers
8k
views
How to create Angular 8 project using Angular CLI 9
I'm using Angular CLI 9.1.1 but need to create a project with Angular 8.
I also have other projects using Angular 9, so I don't want to install Angular 8 CLI globally.
Is there any option to create an ...
0
votes
1
answer
497
views
Angular9: Type 'Observable<HttpEvent<class>>' is not assignable to type 'Observable<class>'
In my angular application, I have a service file that makes API calls. in one of the function I have as below.
getSelectedPractitionerPermissions(id): Observable<classA> {
const url = ...
0
votes
2
answers
567
views
Cannot install @angular/[email protected] after install nodejs
I've tried to install @angular/[email protected] (npm install -g @angular/cli)
Then the following error message appeared:
npm ERR! Response timeout while trying to fetch
http://registry.npmjs.org/@angular-...
8
votes
2
answers
8k
views
pre-build script to update config.json based on the environment variable
I have an angular 9 application in which I read the api url from an assets folder:
@Injectable()
export class ConfigService {
private configUrl = '../../../assets/config/config.json';
...
29
votes
5
answers
58k
views
How to import all Angular Material modules in Angular 9
I want to import all angular material modules and use into overall angular project templates.
1
vote
1
answer
1k
views
cant downgrade angular cli to version 8.x.x
I need to downgrade my angular cli from version 9 to version 8. I have tried the following:
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected]
whenever I reinstall it ...
0
votes
1
answer
174
views
How to create data gridview conditionally in runtime in angular?
I want to represent ODF(Optical Distribution Frame) as gridView in angular let's say we have 24 ports ODF
export class TestComponent implements OnInit {
constructor(private bbService: ...
0
votes
0
answers
185
views
How to properly package Electron + Angular-cli 9?
My question is because I have been seeing how to do it for a long time and the first few times it worked, but lately I have had many problems.
I have seen several Blogs on how to link Electron with ...
2
votes
0
answers
227
views
ERROR in document is not defined in angular 9
document.querySelector('.pcoded-inner-navbar').classList.add('scroll-sidebar');
I comment all code related to documment but till when I try to build using ng build I found ERROR in document is not ...
3
votes
1
answer
2k
views
How to add subresources integrity with Angular appShell build
I built an application with Angular CLI 9.
I patched the package.json file with :
{
"scripts": {
"build:prod": "ng build --prod --subresource-integrity",
"prebuild:prod": "...
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 ...
0
votes
1
answer
729
views
ng serve command requires to be run in an Angular project, but a project definition could not be found
I am trying to create nrwl workspace project using nrwl cli.
I am following the below github instruction to create the nrwl workspace project
https://github.com/onehungrymind/angular-core-workshop
...
2
votes
0
answers
155
views
Angular 9 migration changed tsconfig.app.json
Why it changed from
"include": [
"src/**/*.ts"
]
to
"include": [
"src/**/*.d.ts"
]
I know for what exist *.d.ts files. Question - why does it changed in Angular 9?
2
votes
1
answer
4k
views
Angular service worker doesn't cache assets once deployed on Github pages (sub-directory)
I developed an Angular PWA demo application (Angular v9.1.3), implementing performance and freshness strategies.
Locally it works perfectly, even offline. But once deployed on Github pages, it is not ...
1
vote
0
answers
2k
views
copy assets from one of the package from node_modules
I have one requirement where I am installing @PDFTron package. Along with the import I have reference the path inside .ts file,for that the files should be in the assets.
I am trying to copy files ...
1
vote
0
answers
853
views
Angular v9 ng serve with specific i18n locale configuration show default locale language
When try to serve my angular v9 app with different locale configuration, Default language shown all the time, while ng build --localize is working as expect.
node --max_old_space_size=4096 ./...
24
votes
8
answers
28k
views
Angular9: ERROR in The target entry-point "@angular/fire/auth" has missing dependencies
When I run npm run start I get the below error regarding firebase.
Tech: Angular version 9, Firebase, Firestore, Geofirestore Angular CLI.
Error:
ERROR in The target entry-point "@angular/fire/auth"...
4
votes
2
answers
2k
views
Angular error: newTree.optimize is not a function
I recently started getting this error when attempting to create a new component using the angular CLI:
newTree.optimize is not a function
the issued command was:
ng g c test
Googling return only ...
7
votes
1
answer
11k
views
Angular Error on `ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`
I've recently updated my Angular project from 8 to 9. It worked fine on my machine. I tried copying the files and assembling them on another device. While doing npm install I am getting the following ...
65
votes
12
answers
140k
views
Angular 9: Value at position X in the NgModule.imports is not a reference
I upgraded an Angular App from v8 to v9. The project imports a custom UI library using Angular 8 and moment.js.
When I build it:
It generates a warning:
WARNING in Entry point '@myLib/catalogue' ...
0
votes
1
answer
365
views
Problems running an Angular 9 app in NodeJS
I have a working NodeJS server and an Angular 9 app. I'm able to test the app in development mode, it works perfectly.
But, when I build the app with ng build --prod and try to access it with NodeJS ...
6
votes
5
answers
10k
views
Angular 9 : NullInjectorError: No provider for CompilerFactory
Get the message when running the app in browser prod/aot mode. Below is my main-aot.ts
Uncaught NullInjectorError: StaticInjectorError(Platform: core)[CompilerFactory]: NullInjectorError: No ...
48
votes
11
answers
36k
views
angular 9 library publish error "Trying to publish a package that has been compiled by Ivy"
I migrated my angular 8.x.x project to angular 9.x.x and when I try to publish my library, it fails with below error
npm ERR! @candiman/[email protected] prepublishOnly: node --eval "console.error('...