Questions tagged [angular-input]
49 questions
1
vote
1 answer
angular how to refresh the value of @Input
Hey i try to learn @Input to minimize redundant code.
My Problem is the i dont now how to get my list updatet
Component that receives data
export class DumpListComponent implements OnInit {
@Input() dataSource: MatTableDataSource;
…

Sniphs
- 35
- 4
1
vote
1 answer
Cannot access the parent formControl object changes in a Parent-Child Component relationship in Angular 8
I have created a parent component as follows:
Parent ts file
import { Component, OnInit } from '@angular/core';
import {…

Pranav Bhagwat
- 287
- 2
- 11
1
vote
1 answer
Route-Activated and Input-Receptive Components in Angular 2
I'm creating a component that I'd like to use as a child in another component but also as a standalone view.
For instance, component ViewCarsComponent pairs a list, SmallCarsListComponent, and a panel for viewing detailed information about a Car…

Zulfe
- 820
- 7
- 25
1
vote
1 answer
Angular: Passing data from parent to child with input undefined
I have created a popup box component with error information (if there is an error).
At the moment I have an interface.
status-message.ts
export interface Status {
message: string;
}
login.component.ts (parent)
import { Status } from…

DevStacker
- 675
- 10
- 23
1
vote
2 answers
Angular: How to use Input value from parent component in typescript file
How to use / manipulate @Input()items in child-component.ts before we pass it to child-component.html? I'm getting empty object if console log in ngOnInit
child-component.ts
@Input()items: any[] = [];
parent.component.html

SKL
- 1,243
- 4
- 32
- 53
0
votes
0 answers
Modification of primitive values from @Input() object in child component Angular
I want to modify the @Input() object values in child component after every change in parent component. Please find the sample example
In below example, I increment the counter from parent component and passing complete object to child component.…

user3340927
- 25
- 1
- 5
0
votes
2 answers
why is my input setter called even without changes
I have typical setter/getter for an input in my code, as I want to execute a function when the value changes, but somehow it is fired without input changes
private _myInput: string[]: [];
@Input()
get myInput(): string[] {
return…

cucuru
- 3,456
- 8
- 40
- 74
0
votes
1 answer
Why Angular Input is undefined?
I have typical easy situation but in that case @Input() does not working...
Child Component:
@Component({
selector: 'app-test-grid',
templateUrl: './test-grid.component.html',
styleUrls: ['./test-grid.component.scss'],
})
export class…

ruddnisrus
- 187
- 5
0
votes
1 answer
Angular, Type 'string' is not assignable to type '(value: any) => void'
I'm passing a value to an @Input() in angular,
but somehow this is not working and I do not understand what I'm doing wrong
private _foo = ''
@Input() foo(value: any) {
this._foo =…

Raphaël Balet
- 6,334
- 6
- 41
- 78
0
votes
1 answer
The reason for using the eventemitter to send data from the parent component to the child (Angular)
While learning Angular, I realized that there is no need to use eventemitter to send data from the parent component to the child component, while the eventemitter must be used to send data from the child component to the parent component.
Is this…

user16142561
- 3
- 1
0
votes
1 answer
Why doesn't a value update correctly in object and html?
I am making an itinerary generator, all the activities have their duration (in minutes) and the itinerary have a start time so when I generate the itinerary I update the hour in base of activity duration and show the updated hour in the next…

Leonardo Esquivel
- 57
- 6
0
votes
1 answer
change variable when inputs changed in Angular
When numbers are entered in the price(Fiyat) fields in the picture, I want the place that says 0 TL to change. The place that says 0 TL should be the sum of the numbers step by step. How can i do that?

emiirhaneksi
- 11
- 2
0
votes
2 answers
Cannot read properties of undefined reading base64 - Angular
I have input field to upload image

Kael
- 161
- 2
- 13
0
votes
1 answer
Angular: How I can check if value is not null or undefined before passing it to the child component
I need to manipulate the data in a child component before I use it in a template. I'm getting null in ngOnInit child component. How I can achieve this?
parent.component.html

Johnny
- 261
- 7
- 22
0
votes
0 answers
Manually set angular value back to the [value] property after typing some text
I have a component where I can select an item from a list. There is another section on the screen where the data of that item is shown on the screen. In this data display section, there I have something along the lines of

user13890070
- 11
- 2