31 questions
2
votes
1
answer
52
views
Create new array from existing array with specifc node values
I have following array:
[
{
fileName: "test.pdf",
fileUrl: "https://test-url1.com/test.pdf",
isDeleted: true
},
{
fileName: "test.pdf",
fileUrl: ...
0
votes
2
answers
80
views
Want to access index of array in angular
I am getting array in this way, check attached image.
Now I am trying to display edit icon as this below :
{
header: 'Edit',
field: 'id',
view: (value: string, obj: any) => { ...
0
votes
1
answer
354
views
How do I calculate the Amount value for the each row, without replacing the newest amount value. (Angular)
Adding the Rows. Here getting the quantity and the price value using the change event.
`
<div class="row">
<div class="col-md-6">
<...
0
votes
1
answer
1k
views
how can i show the data received from backend api in angular
Im currently trying to show the data of an employee after he loggin to his account, i can get the data of the employee from the backend by his username and i can console logged it , but when i assign ...
0
votes
1
answer
189
views
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. Getting this in get API
This Error is coming when I am trying to show the data from an get api on html template using ngfor in angular
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. ...
0
votes
1
answer
1k
views
Angular - Passing FormBuilder values to Array results in empty string values
I have a form that I fill out using Angular's FormBuilder. This is the FormBuilder representation in the component typescript file:
constructor(private Form: FormBuilder) { }
AddStatusBoxForm = this....
1
vote
1
answer
1k
views
Hide/Show form field(s) on mat-checkbox check Angular
I am trying to show and hide the search filter input field which is basically my form field with the check of a checkbox that is in my search filter button.
I am using *ngIf here to show and hide the ...
0
votes
3
answers
658
views
Angular - how to reuse a standard data array
I am using a Indian states data array like the below in various components of my Angular project.
I know one way is to add it as a collection in backend database. But I would not like to make an API ...
2
votes
1
answer
1k
views
Angular ngIf: Identifier 'length' is not defined
My component has the property transfers$ that is an observable that can comes with an array or an object that contains the error message.
I can only input [items] when transfers$ is Transfer[]. But ...
0
votes
1
answer
140
views
How to display data array without duplication in angular 9?
Html file:
// First Table has array data --> name,netCash,phonePay2,card,cellPay2,total2
<table class="table table-hover table-bordered table-striped table-sm">
<thead ...
1
vote
1
answer
75
views
I need to convert one of the form arrray in my formGroup
This is my ngOnInit
ngOnInit() {
this.formGroup = this._formBuilder.group({
basic: this._formBuilder.array([this.basicGroup()]),
experience: this._formBuilder.array([...
0
votes
1
answer
1k
views
how to map two arrays in Angular 8
I have two arrays partyCtx and planList
partyCtx looks like this:
partyCtx: Array(5)
0: {planCode: "PLN00062", planShortName: "Federal Home Loan Bank of A", employerPartyID: "...
0
votes
1
answer
700
views
Pass data to Array of Child Components in Angular
I have parent component and child components in my project and array of objects called from API in parent component.
Parent Component
public Questions = [];
ngOnInit(): void {
this.loadQuestions(...
1
vote
1
answer
2k
views
Angular array filter is not working on a list of string
I have an array of string, and want to filter out a particular string after some operation. But, it seems I am doing something wrong there.
this.displayUser.followers.filter(userId=>userId !== this....
0
votes
0
answers
328
views
Display Array Objects in Dropdown- Angular Firebase
I want to display the items from the "cabinet" array in a dropdown. I've tried the below code, but it's not working. Please help.
Component.ts File:
getProductDetail(id: string) {
...
0
votes
2
answers
993
views
how to create a hyperlink for values from an array in Angular 8
I have data that looks something like this
plans:[
{
"planName": "PlanA",
"planCode": "PLN001"
},
{
"planName": "PlanB",
"planCode": "PLN002"
},
{
"planName": "PlanC",
...
0
votes
1
answer
2k
views
Getting a specific DOM element in angular component using click HostListener from an array
This is a little bit harder to explain, but I will do my best.
I have a component called feed, and the component it expects an array(feeds) of objects(feed). I have a template which i display all the ...
2
votes
1
answer
4k
views
Angular 9 mapping a json response to array
I have this interface
export interface Student {
cf: string,
firstName: string,
lastName: string,
dateOfBirth: Date,
description?: string,
enrollmentDate?: Date
}
I want to ...
1
vote
1
answer
1k
views
How can I store value in a nested object array in Angular 8
I am creating an order entry form where we shall store both master and details data. Below I am showing you my entity details which wrote in typescript.
export interface IOrder {
id: ...
0
votes
1
answer
84
views
Angular getting from forms arrays
I'm making CRUD app in angular 6 but when i go to edit page i want to pass data from array to the input fields on that page, but when i save that page data should be again in the array (you can see on ...
1
vote
1
answer
1k
views
Angular ngFor with dynamic adding of objects [closed]
Please check the video: https://screencast-o-matic.com/watch/cqQQj2tA22
I'm adding dynamically objects to an array and would like to set the values once the objects are added. Now when I'm adding a ...
2
votes
1
answer
3k
views
Angular Viewmodels and usage in components
I'm trying to bind viewmodels to a view through component. Initially I did this in the component and it was almost working:
model: any = {
TenantId: '',
CustomFieldName: '',
...
2
votes
1
answer
4k
views
Pass the right element's data from ngfor loop to the child component
Im looking to inject the data from a ngfor loop on the parent component into a child component. This child component is supposed to render a modal with the data of the right element in the parent's ...
1
vote
2
answers
10k
views
How display data from json array in angular 7
I have a json data set with arrays from my ASP.net Core web api, i want to show that data in angular html page. can you help me.
angular 7 cli
home-page.component.ts
ngOnInit() {
this....
-1
votes
3
answers
70k
views
How to filter an array and return the entire object - Angular
export class ResultComponent {
students: AdmissionFormData[]
constructor(private adStudent: AdmissionFormService) {
adStudent.adFormGet().subscribe(
x => this.students =...
0
votes
3
answers
7k
views
Angular 6 HttpClient assign resulting payload to array
I am attempting to do a get call in angular the call itself works as I can put a log in the subscribe and see the returned data the issue I am having is I can't seem to assign the data to my existing ...
4
votes
3
answers
9k
views
Copy array of Objects in angular 2
I have two array called 'persons' and 'persons2',
The 'persons2' array would to be copy of 'persons' array,
But the problem is when I copy it, and I want to change the second array, the first array ...
0
votes
1
answer
277
views
Angular service code is running with a delay
I am new to angular. Learning Angular 6. Trying to fetch data from a database which is working totally fine. But I am trying to get the length of the returned array also. Problem is the code for ...
0
votes
1
answer
2k
views
How to convert array value recieved from dropdown multiselect to string in angular 5
I have used a material dropdown multiselect through which the users can select multiple data. when the data is being sent to the component the data is recieved in an array format which is not accepted ...
0
votes
2
answers
49
views
Angular 2 array template update not working
I have a component that is using the cordova BLE plugin. When the scan starts to find devices it pushes each device found to an array of objects. In my template I use *ngFor to loop through the ...
2
votes
1
answer
574
views
Easy way to double bind length of angular array where object has 'true' for a specific property?
I have the following list of students:
students = [{name:'Jordan', passed:true}, {name:'Kyle'},{name:'Jess'},
{name:'Sam', passed:true}
]
I want to be able to, in an HTML ...