11 questions
1
vote
2
answers
73
views
Angular @input and @Output conflict
I made a directive in angular which is act as a time input and in template of component I repeated it based on an array of string.
The directive has an @Input that is the initial value which is set to ...
2
votes
1
answer
456
views
Angular @ouput a values when a signal change
What is the best way to @output the value of a variable with angular signal ?
Let say we have the following
$foo = signal<string>('')
@Output() fooChanged: EventEmitter<string> = new ...
1
vote
2
answers
92
views
Dynamic Component Outputs
I have 2 components in Angular, a parent and a child. I'd like the parent to be able to
pass an array of objects representing a clickable thing to the child
have the child component dynamically ...
0
votes
1
answer
40
views
Onclick of the list item button name should display which is in array
i have been trying to display the name of the array item onclick of the user button but onclick of that i m getting name of the user in console but not in page level
this is the app.component.ts file ...
0
votes
1
answer
3k
views
How to emit a click event with Angular 18 output api
I have a button component that receives some inputs and when is clicked I want to emit the fact that it's been clicked using the new output api.
This is button.component.html
<button (click)="...
0
votes
1
answer
69
views
Max Stack Call Size when adding parent's tamplate into child's HTML template in Angular
This is the child's template:
<div id="io-struct">
<div id="input-struct">
<h3>Degrees: <input type="number" [(ngModel)]="degrees&...
0
votes
1
answer
346
views
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 ...
0
votes
1
answer
123
views
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 ...
1
vote
1
answer
2k
views
Testing Angular Output without spying on the component instance
Let's suppose I have the following component:
@Component({
selector: 'app-dumb',
template: '<button (click)="increment()">Increment</button>'
})
export class ...
0
votes
0
answers
491
views
Angular: How I can pass a value to child component after successful output eventemitter
How I can setvalue to true in angular after successful emit operation. How I can pass a flag to app.child.ts after successful api call in parent component?
app.parent.html
<form [formGroup]="...
0
votes
0
answers
295
views
How to dynamically create @Output on an Angular Component?
For the sake of simplicity, Let's say we have a MyComponent with an @Input() eventName = 'signal'.
I would like to use the value signal as the name of a dynamically created EventEmitter. Which I can ...