Skip to main content

All Questions

-2 votes
3 answers
7k views

How can I dynamically set a CSS class list of an element in Angular from the class component?

I want to set a property as a string and add that dynamically into a certain DOM element as a class list value. <div [className]="propertyVariable"></div> And inside the class ...
Klem Lloyd Mwenya's user avatar
2 votes
1 answer
3k views

How can I fetch nodelist with document.querySelectorAll in Angular?

This is a part of an e-commerce app in which customers can select an order and go to checkout. A group of similar buttons that have a data- attribute, with respective extensions to data-something. I ...
Klem Lloyd Mwenya's user avatar
-1 votes
1 answer
62 views

Is this way of making a Dropdown using Angular bad practice? [closed]

I'm failry new to Angular and I've recently tried to create my first dropdown using it and it works really well. But since it's causing quite many comparisons, I am wondering if this way of doing it ...
Unnamedplayer21's user avatar
-1 votes
2 answers
58 views

How to Solve this code in javascript? Combining of different objects with same value into single array

Input var arr = [ [ Packet { status: 'Apple', count: '2' }, Packet { status: 'Lion', count: '2' } ], [ Packet { status: 'Donkey', count: '2' }, Packet { status: 'Apple', count:...
user avatar
1 vote
0 answers
879 views

angular 11 polyfill now working in ie11 , How do I working on IE11?

I use Angular 11 + typescript 4.0 Chrome is fine but It is not working in IE11 IE11 Does not show errors in console. How do I working on IE 11? Before I changed es6 => es5 in polyfill but still not ...
Nnie Vi's user avatar
  • 11
-3 votes
4 answers
71 views

How to traversed object of two arrays as following output in JavaScript

I have two object of arrays, i want to process it as following output var parts={"Glenn": [12,22,32], "Ryan": [13,23,33], "Steve K": [14], "Jerom":[15,25,35], }; var labor={ "Glenn": [12,22,32], "...
Sherin Green's user avatar
9 votes
5 answers
30k views

error NG8001: 'router-outlet' is not a known element [duplicate]

error NG8001: 'router-outlet' is not a known element: 1. If 'router-outlet' is an Angular component, then verify that it is part of this module. 2. If 'router-outlet' is a Web Component then ...
Code Junkie's user avatar
1 vote
2 answers
274 views

Where do I find Angular CLI 7.3.9 default generated webpack settings file so I can build my overrides based on it?

I want to extend webpack building process for a project generated by Angular CLI v7.3.9. I found out I have to use this tool: https://github.com/just-jeb/angular-builders/tree/7.x.x/packages/custom-...
JustAMartin's user avatar
  • 13.8k
1 vote
1 answer
269 views

Setting value to nested object not working in angular

I'm new to Angular and TypeScript so appologies if this is a stupid question. I'm trying to save the value of a returned object to a nested property in an object of type any. However, its not allowing ...
Kaane Guji's user avatar
13 votes
2 answers
11k views

Angular Material (8) S2591: Cannot find name 'require'

I am trying to log date/time into the javascript console. The error message I am getting is as follows and was generated by the code below. ETA: the code does work. The dates are going to the console. ...
Casey Harrils's user avatar
1 vote
1 answer
257 views

angular 8 - Error trying to diff '[object Object]'. Only arrays and iterables are allowed

I want to display search results, but whenever i am trying to type anything to search box it shows error in console. i am fetching data from api and according to type i am displaying results in tabs. ...
Pratiksha Kale's user avatar
14 votes
8 answers
41k views

Angular 7/8 - How to get url parameters in app component

I have Single sign on in place but for testing I want to read the values from the url localhost:4200/?id=test&name=testing&[email protected] and pass them to an API in app component. ...
Lovika's user avatar
  • 617
3 votes
1 answer
314 views

How to avoid "ExpressionChangedAfterItHasBeenCheckedError" or "Cannot Read Property of Undefined" when you're using info from "@ViewChild"?

I'd like to understand some questions about @ViewChild and how it works. I'm using angular 8, and for some reason I got some errors, such as "ExpressionChangedAfterItHasBeenCheckedError" or "Cannot ...
Celso Agra's user avatar
  • 1,499
15 votes
4 answers
42k views

cannot find module since the path is mentioned in the tsconfig.json

My typescript code giving following error for paths which is specified in the tsconfig.json. please guide me to resolve this issue. Error: Cannot find module 'flows/Maths' at Function.Module....
Venugopal P's user avatar
3 votes
1 answer
2k views

Get 404 when refresh page after using PathLocationStrategy in Angular 7

We use angular 7 + node 8.11.4, previously, we use HashLocationStrategy and all routes worked, while, as you know, '#' will auto added in URL as Hash flag, now we want to remove '#', so i use ...
Rollsbean's user avatar
  • 753

15 30 50 per page
1
2 3 4 5