Angular - Error: spawn cmd ENOENT

Hi I have problem when I generate angular - yo angular. I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command...

How to keep form data when switching tabs/routes?

When switching routes. How to keep state of the application as it is? I observed that Angular class is reinitialize every time I switch tabs. For eg. Plunker import {Component, View,...

Angular 2 How to detect back button press using router and location.go()?

I have built an app that uses router 3.0.0-beta.1 to switch between app sections. I also use location.go() to emulate the switch between subsections of the same page. I used <base href="/"> and a...

TypeScript-'s Angular Framework Error - "There is no directive with exportAs set to ngForm"

I keep getting this error while using TypeScript's Angular2-forms framework: There is no directive with "exportAs" set to "ngForm" Here's my code project dependencies : "dependencies": { ...

Pass NavigationExtras to routerLink in template

I want to disable changing the URL when routing in my Angular 2 app. I know that skipLocationChange: true has to be passed as a NavigationExtras parameter to the router. My question is: Is it...

Generate a routing module while creating a module in angular-cli

I recently started implementing lazy loading in my application. I was wondering whether there is any way to create a routing.module.ts while generating a new module in angular-cli application...

Build:Cannot find type definition file for 'node'

VS 2015 community edition (at home), npm 3.10, Angular 2 Im trying to pull get Angular2 setup within an ASP.Net MVC 5 app. The template I started with used an older version of Angular, so I...

How to get param from url in angular 4?

I'm trying to get startdate from the URL. The URL looks like http://sitename/booking?startdate=28-08-2017 My code is below: aap.module.ts import {...}; @NgModule({ declarations: [ ...

Can Angular 2 parse links received from external CMS to be resolved as internal

We are working on a decoupled project with Drupal as our backend and Angular as our front-end. Everything is nearing completion but certain (dynamic, as in created in Drupal) pages require links...

NullInjectorError: No provider for MatDialogRef

I can't inject MatDialogRef as it described in documentation: https://material.angular.io/components/dialog/overview When i'm trying to do it i'v got error: ERROR Error:...

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

Angular 5 Scroll to top on every Route click

I am using angular 5. I have a dashboard where I have few sections with small content and few sections with so large content that I am facing a problem when changing router while going to top....

How to have a sidenav with router-outlet and a separate login with router-outlet?

I am trying to implement an app with a login page and then when the user is logged in, there would be a navbar, toolbar and sidenav that have a router-outlet. Basically, in the app.component.html...

Force routerlink to refresh component

I have created a very basic angular 5 application. I have a left menu which is always displayed (it is part of asp.net core2.0 mvc project skelton with bootstrap). I have created 2 links in this...

How to implement a remember me function?

I am doing an Angular 4 application with node js backend. I did the login form, and all is good I want to implement the function "remember me". This my login service: import { Injectable } from...

Why data on service isn't saved when changing routes?

I'm new to angular and i try to build a small app. I have this service who holds a variable and a function: data.service.ts data = []; getData() { this.http.get(url).subscribe((res)=> ...

Angular unit test routerLink state

Im passing data between angular (version 8) components A & B using state, example: <a routerLink="/componentB" [state]="{data: {hello: 'world'}}">Go To ComponentB</a> In ComponentB, i'm reading...

child route configuration with Angular 8

I have an app with angular 8 in which a have created two module: testModule and SimulatorModule the simulator is having a routing file but the testModule doesn't. I want to load all the...

npm ERR! 404 Not Found - GET https://registry.npmjs.org/error-ex

I am trying to install npm package dependencies in to my angular application and i am getting this error. Any help to fix this? npm ERR! code E404 npm ERR! 404 Not Found: [email protected]^1.2.0 npm ERR!...

using video tag inside SVG element results in weird error

I'm trying to use the same code that is used in this answer but I'm getting an error in the console log instead: The Code <svg version="1.1" class="center-block" xmlns="http://www.w3.org/2000/svg"...

typeError: Cannot assign to read only property 'tView' of object '[object Object]' in angular 9.0.4

i did use the angular 8 and update that to angular 9 . but when i run the project it show me this error in console : RROR Error: Uncaught (in promise): TypeError: Cannot assign to read only...

Uncaught (in promise): Error: Angular JIT compilation failed: '@angular/compiler' not loaded! in angular 9

I create a webaite with angular 9 but i have a problem with angular . In some route I have the error: ERROR Error: Uncaught (in promise): Error: Angular JIT compilation failed: '@angular/compiler'...

Material MatInputModule not working angular 9

I am using Angular Material component https://material.angular.io/components/input/overview but Material animation is not working package dependency "dependencies": { "@angular/animations":...

Angular routing redirect to home when refresh another page

In my application I have an homepage after the user logged in and some other pages. The problem is that when I am inside in one of these other pages and I refresh the page it sends me to home...

Error: inject() must be called from an injection context but can't find origin

I'm using angularfire's authentication service to register and login users to my application but when I trigger the register or signin method, I get the following error: Error: inject() must be...

Angular - Type Pipe does not have '╔Ámod' property

I am attempting to create a custom pipe that would return a sum of an array in a table, but for whatever reason, Angular is complaining about my pipe not having an 'emod' property. My pipe: import...

How to specify replace url option in router link angular html template

<button color="dark" fill="outline" [routerLink]="['/home']" size="medium" >Click here to add some</button> how should I pass replace URL option just like we do in the TS file await...

NullInjectorError: No provider for InjectionToken angularfire2.app.options! 2021

Okay I just started using angular firebase and I've been scratching my head for two days. Most of the tutorials out there are mostly for older versions of firebase this is the error that I am...

Angularfire does not work on ionic capacitor app on ios

I am using ionic with capacitor and angularfire. It works fine but does not work on ios. On ios I don't see any error - just the firebase call that never returns anything. Below is my package.json...

how to get Angular search filter to work?

I have the following code where I am trying to search the column "Failure signature" by typing a string ,whenever I type a search string it doesn't appear to work ,the data is not filtered based...