Regex for numbers only (no spaces or special chars) using ng-pattern

I have an input field that should only be valid if it contains only digits and no special characters and no spaces. I am using ng-pattern in angular to validate the input. I have tried...

Prevent form submission when validation fails (Angular Material)

I just discovered Angular and Material design, and I really love all the features that come out of the box. I created a contact form with validation, which gives error messages when a field is...

'fn' is not a function with Angular and Webpack

I have just started out attempting to use Webpack to bundle my Angular App. When I have included the essentials I am getting the following error Argument 'fn' is not a function, got string I think...

create a login spinner while angular singe page application is bootstraping

I've created a single page application using angular. problem is that it takes a long time for it to load. I want to present the user a spinner which indicates that the app is bein loaded. the...

NgbTooltip position in Angular application

In my Angular 2/4 application, I use ng-bootstrap and its component NgbTooltip. Assume the following HTML snippet <div class="col-sm-8 text-ellipsis" ngbTooltip="'A very long text that does...

Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("

I am learning Angular from scratch and I am very new. Please forgive me if my question is very simple. I have done research but those solutions did not work for me. I have a app.component.html...

Collapse not working in ng-bootstrap and angular 4 app for navbar breadcrumb button

I am using angular 4 and bootstrap 4 beta 2 and ng-bootstrap for my application and also using ng-bootstrap. I have added the navbar from the bootstrap documentation example. The code looks like...

Error: No provider for t

I am trying to compile my angular code to production mode via ng build --prod and its successful but in browser I get the error : ERROR p {__zone_symbol__error: Error: Uncaught (in promise):...

"Http failure response for http://localhost:4200/api/: 404 Not Found" Angular 5

I start in Angular 5, I want to display the list of Cities from a JAX-RS API, then I get the following error : Http failure response for http://localhost:4200/api/: 404 Not Found Here you will...

ERROR Error: Uncaught (in promise), Cannot match any routes. URL Segment

I have simple navigation in angular 6 app, Here is HTML <nav class="main-nav> <ul class="main-nav__list " ng-sticky [addClass]="'main-sticky-link'" [ngClass]="ref.click === true?...

forkJoin is deprecated: resultSelector is deprecated, pipe to map instead

I'm working on an Angular 6 project. Running ng lint gives the following Warning: "forkJoin is deprecated: resultSelector is deprecated, pipe to map instead" ...

PrimeNG Calendar - Override the default style

Using angular, I am using p-calendar in a component and created a CSS class that is called from my component. No matter what I do I am unable to override the style. CSS .ui-calendar...

Nullinjectorerror: no provider for FormBuilder (I'm importing ReactiveFormsModule)

So I'm trying to write a really basic test for a component. I just want to make sure that the form that I'm creating using FormBuilder is an instance of FormGroup, but I'm consistently getting a...

Angular 2+ Universal page not rendering on server

I have gone through guide provided in docs at angular.io to implement SSR(Angular Universal) in my Angular 8 application, everything went fine, and I have no errors in my server console or browser...

Angular 8 showing blank page with no errors

I am developing an Angular 8 application that will login to a .Net Core Rest API using JWT Token Authentication. When I start the application the application compiles successfully with no errors....

Why are table headers not displayed in responsive primeng table?

I have a primeng datatable, it is properly rendered in normal mode. But, when I view in the mobile view, the table headers are not displayed. I have the responsive property of the table set to...

Angular 8 Cannot access 'PlanningModule' before initialization

I am using the apex theme from themeforest. I am trying to acces the page: /planning However, the console shows a error: core.js:6014 ERROR Error: Uncaught (in promise): ReferenceError: Cannot...

Can't bind to 'count' since it isn't a known property of 'ng-container'

I have reconfigured some code and now receiving the error "Can't bind to 'count' since it isn't a known property of 'ng-container'" Rather than have the notification component and...

How to change the color of an svg element in Angular?

I need to load, display and dynamically change the color of an SVG image in my Angular project by applying different CSS classes to it. This question didn't help, since it makes use of the...

Angular 9 lazy load component error: No provider for InjectionToken mat-autocomplete-scroll-strategy

I upgraded my project from Angular 8 to 9 and refactored my code to take advantage of the ability to lazy load components. For most of my components this works great, but I have one that is...

Angular : Couldn't find a route declaration in /src/app/app-routing.module.ts

When I try to add automatic routing for components generated using following command ng generate module orders --route orders --module app.module I get the error Couldn't find a route declaration...

How to resolve ERROR NetworkError at XMLHttpRequest.send (...dist\fxcore\server\main.js:200768:19)

I am new to Angular. I just finished developing my angular web application. When I use ng serve to serve my application during production, everything works fine. I added angular universal. Now...

Angular problem 'mat-table' is not a known element

I have a problem creating a table. Error in HTML: "mat-table' is not a known element: If 'mat-table' is an Angular component, then verify that it is part of this module. If 'mat-table' is a Web...

Angular storybook withKnobs (storybookjs/addons/knobs) array of objects with select() is not working

I am relatively new to Angular, and here I am trying to implement a very basic storybook component with ng-select and storybook in an Angular project and using storybookjs/addons/knobs The...

Why Angular always redirecting to main page?

Always I trying to GET '/' it shows static-root-component (component of my main page), but when it is '/welcome' page immediately redirecting to '/' and also loading static-root-component instead...

What can be the reason for the error with render2 dependency injection?

I get the error below, for angular attribute testing when runningng test. No captured browser, open http://localhost:9876/ 03 01 2021 19:23:43.285:INFO [karma-server]: Karma v5.0.9 server started...

Reloading routes are returning 404 error in Angular Azure static web app

I have deployed an Angular app in azure static web app but I am facing with an error which it is, when I redirect to some routes it is returning me 404 error, but if I am in web app and I go from...

Angular 12 Material shows cannot read property errorstate undefined of MatFormField

This is the simple HTML that I have written for single page web app <div class="bg"> <h1 class="faq_heading">Frequently Asked Questions</h1> <div class="search"> <mat-form-field...

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...

TypeError: Cannot read properties of undefined (reading '<myvariable>')

While running the ng test in one of the components I am facing the below error. TypeError: Cannot read properties of undefined (reading 'dateOfLeaving') error properties: Object({ ngDebugContext:...