Categories
Mastering Development

Angular Reactive Form Group Issues with Lazy Loaded Components

I am trying to Implement A Reactive form in one of the Lazy Loaded Component and I am getting the following error. Stackblitz Link ERROR Error: Uncaught (in promise): Error: Template parse errors: Can’t bind to ‘formGroup’ since it isn’t a known property of ‘form’. (“<h3>Product List</h3> <form [ERROR ->][formGroup]=”myForm”> <input type=”text” formControlName=”name”/> “): ng:///ProductsRoutingModule/ProductListComponent.html@2:6 […]

Categories
Mastering Development

How to configure Angular to use Firebird with Webpack

How to correct way to implement the Firebird with Webpack on one simple Angular component? I read some posts that “require” has been discouraged? The package used is this https://www.npmjs.com/package/firebird I already installed webpack npm install –save-dev @types/webpack-env And updating my tsconfig.json with the following under compilerOptions: “types”: [ “webpack-env” ] Could someone help me […]

Categories
Mastering Development

How to deploy Angular 9 on heroku?

I am trying to run Angular application on Heroku. I have read many guides, but the solutions do not work in my case. Application build is successful on Heroku. However, when the application starts, an error occurs. package.json { “name”: “angular-heroku”, “version”: “0.0.0”, “scripts”: { “ng”: “ng”, “start”: “node server.js”, “postinstall”: “ng build –aot –prod”, […]

Categories
Mastering Development

ERROR in node_modules/@angular/router/router.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context

So I have been learning routing in angular and this is my project that I’m using routing.. but I am facing this error after installing routing to the project. This is the error I am getting: ERROR in node_modules/@angular/router/router.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@angular/router/router.d.ts(68,9): error TS1086: An accessor […]

Categories
Mastering Development

Error “../node_modules/cdk-table-exporter/cdk-table-exporter.d.ts has no selector, please add it”when building angular application

I have installed the below dependency only for using mat-table-exporter in angular 8: npm install mat-table-exporter –save Now when i am building my angular application using below command: ng build –prod –build-optimizer –aot –base-href=/application_base_name I get the error shown below: PS C:\GitRepositories\cricket_aiops_dashboard\Client_Side>ng build –prod –build-optimizer –aot –base-href=/application_base_name Your global Angular CLI version (9.1.0) is greater […]

Categories
Mastering Development

When upgrade angular v8 into v9 i got Cannot assign value “$event” to template variable “element” Template variables are read-only

Cannot assign value “$event” to template variable “element”. Template variables are read-only. I’m also facing this issue even i added “angularCompilerOptions”: { “fullTemplateTypeCheck”: true, “strictInjectionParameters”: true, } into the tsconfig.json package.json { “name”: “bis-webapp”, “version”: “0.0.0”, “scripts”: { “ng”: “ng”, “start”: “ng serve”, “build”: “ng build”, “build:prod”: “ng build -c production”, “test”: “ng test”, “lint”: […]

Categories
Mastering Development

sh: ng: command not found Failed to exec start script on openshift while deploying

I hit the below error on container when i deploy the app on Open shift. status of container is Crash Loop Back-off Local env works fine with no errors. I made sure angular package versions are aligned to get the build successful. > ng serve sh: ng: command not found npm info lifecycle dashboard@0.0.0~start: Failed […]

Categories
Mastering Development

Error TS2440 (TS) Import declaration conflicts with local declaration of ‘PluginConfig’

I am trying to run my application in Visual studio 2017 and I keep getting the error: “Error TS2440 (TS) Import declaration conflicts with local declaration of ‘PluginConfig'” I tried downgrading my typescript, but the error is not going away. Below is my package.json file: { “name”: “frontend”, “version”: “0.0.0”, “license”: “MIT”, “scripts”: { “ng”: […]

Categories
Development

Angular 8: Chrome developer tools no longer work

I recently updated from Angular 7 to Angular 8. Now when I try to use the developer tools in Chrome, nothing shows up, and the JavaScript console shows this: Uncaught TypeError: document.registerElement is not a function at Object.UI.registerCustomElement (shell.js:formatted:18064) at shell.js:formatted:18178 at shell.js:formatted:18266 devtools_app.js:formatted:2606 Uncaught ReferenceError: SDK is not defined at devtools_app.js:formatted:2606 The code in […]

Categories
Development

TimeoutException: The Angular CLI process did not start listening for requests within the timeout period of 0 seconds

I’m getting this error after upgrading to angular 9. I’m using visual studio 2019, ASP .NET core with angular. Even if I create new project and update angular to 9 version, It stops working. Complete list of page response is : TimeoutException: The Angular CLI process did not start listening for requests within the timeout […]