Category "angular"

Angular/Jest - Test that the subject has thrown error after setter is called

I have a class that is responsible for setting the theme for my application. I'm trying to test that it throws an error if you give it a theme that it does not

How to change the date format in the datepicker of Angular ngx-bootstrap inside a form

Using ngx-bootstrap Datepicker in an Angular 4 application, I know that normally you can specify the date format this way: <input id="from" name="from"

Angular: 7.2.1 ES6 class ReferenceError : Cannot access 'X' before initialization

I'm having the following TypeScript class export class Vehicule extends TrackableEntity { vehiculeId: number; constructor() { super(); return supe

Angular: css variables are not usable in components

Hi i am trying to use css variables to predefine colors for example. Here is my app.component.css :root { --main-bg1: rgb(26, 28, 29); --main-bg2: rgb(66, 7

How to get all the values in one wrapping circle in swimlane-ngx-charts - gauge chart

I'm using the ngx swimlane charts ( import { NgxChartsModule } from '@swimlane/ngx-charts'; ) . Here in the charts ( https://stackblitz.com/edit/swimlane-gauge

Conditionally apply click event in Angular 4

Is it possible to define a condition in the template based on which a click handler is attached? For instance, the closest I can get is evaluating a condition

How to save Dynamic Form Answer in Angular?

I'm trying to save some data that I display dynamic in the browser.This is my HTML where I iterate trough a list of exam questions dragged from the database and

Unexpected character '@' from [script.*.js]

When I try to production build angular, i encountered the error 'Unexpected character '@' [scripts.*.js]'. Production command ng build --prod Angular version:

Disable the entire form at once (Angular reactive form)

Is there any way to disable the entire form in angular when using Reactive forms. I know it is possible to make them disable one by one. this.tempForm = this.

Accept POST request from other website to Angular Application

I want to accept post request to my Angular application from other application. Basically they will send customer id list as a POST payload and I have to proc

ionic 4 nested tabs ion-tab-button 'tab' property is not working properly for nested tabs

I am using ion-tabs for my frontend angular ionic app. I am using nested tabs, So 1st ion-tabs have 3 tabs, Tab 1, Tab 2, feature-tabs and feature-tabs has 3 ta

Angular4 micro front-ends

We have an application composed by multiple services, where there is a edge service routing and load balancing all request to the individual services. The back

How to dynamically render a markdown file in Angular?

I'm trying to write an Angular component that renders markdown files as part of the webpage, using the ngx-markdown library. Looking at the library's official

Npm ERR! code EPERM

I'm using node v6.11.2, npm v5.3.0 and angular/cli v1.2.7. I'm suddenly receiving the following error message for a majority of my npm installs. Never seen it

origin 'http://localhost:4200' has been blocked by CORS policy in Angular7

I want to use of http://5.160.2.148:8091/api/trainTicketing/city/findAll rest for get cities in my angular project. I used version 7.2.15 of angular in my proje

Angular 4.3.3 HttpClient : How get value from the header of a response?

( Editor: VS Code; Typescript: 2.2.1 ) The purpose is to get the headers of the response of the request Assume a POST request with HttpClient in a Service i

Property 'entries' does not exist on type 'ObjectConstructor'

I'm working on an ng2 implementation. I'm using the following function call to convert an object to an array: var authors = Object.entries(responseObject.Author

HTTP status code 401 even though I’m sending credentials in the request

Recently i have introduced JWT authentication to my Springboot and Angualr2 based App. In There i tried to do a POST request by passing the JWT token as below i

Angular url plus sign converting to space

I have angular application where i want to pass plus sign + in query string like: http://localhost:3000/page?name=xyz+manwal When I am hitting this URL its c

HTTP status code 401 even though I’m sending credentials in the request

Recently i have introduced JWT authentication to my Springboot and Angualr2 based App. In There i tried to do a POST request by passing the JWT token as below i