🚀 Generate full stack React, Vue, Angular applications easily with our new Web Application Generator! 🚀
Gravatar

We have updated angular version (12.1.1) after upgrade we have two issues in the UI Template.

  1. API Calling Issue When we tried to call the API from the template, it gave "Invalid URL DOM Exception"
  2. New Package Installation Issue We are unable to install any package in the existing angular template as it gives error, we need a package for multiselect dropdown.

Please suggest.

Gravatar

Hi,

Please take a look followings:
file: app.interceptor.ts
line: req = req.clone({url: this.config.baseURLApi + req.url});
You need to change config.baseURLApi to send the request to another domain.

directory of app.interceptor.ts file: src -> app -> app.interceptor.ts

Please read about HTTP interceptor here: https://angular.io/api/common/http/HttpInterceptor.

In sing-app-angular template, there is a configuration file for host API. Open the project and take a look for the app.config.ts file, inside of that file you see the baseURLApi variable which is responsible for all requests.

To install any new package just use yarn add command.
For ex: yarn add @ng-select/ng-select.

Best regards!

Cookie Consent

By continuing to browse or by clicking 'OK', you agree to the storing of cookies on your device to enhance your site experience and for analytical purposes. To learn more about how we use cookies, please see our cookies policy.