Angular Signal Input - The Solution to Angular Inputs
Вставка
- Опубліковано 28 лют 2024
- Learn Angular signal input and how it simplifies getting data in the component. It solves major problems like using NgOnChanges and not specifying default value.
► CHECK MY COURSES - monsterlessons-academy.com/co...
MOST POPULAR COURSES
► Javascript interview questions - monsterlessons-academy.com/co...
► Typescript interview questions - monsterlessons-academy.com/co...
► React interview questions - monsterlessons-academy.com/co...
► Angular Interview Questions monsterlessons-academy.com/co...
► Building real project with Angular + NgRx - monsterlessons-academy.com/co...
► Building real NestJS API - monsterlessons-academy.com/co...
► Building real fullstack project - monsterlessons-academy.com/co...
► Mastering Git - monsterlessons-academy.com/co...
► Mastering Docker and Docker Compose - monsterlessons-academy.com/co...
FOLLOW ME
► TWITTER - / monster_lessons
► INSTAGRAM - / monsterlessonsacademy
► TIKTOK - / monsterlessonsacademy
REFERENCES
► Source code - github.com/monsterlessonsacad...
Couldn't be explained better. Thanks.
Glad it helped!
Very useful. Thank you a lot
Glad it was helpful!
Really great and useful video
Glad you think so!
Thank you for your great work! But what do you think, is it ok to only use signals from now on? Or just in cases when we expect the variable to change ? how well optimized are they ?
They are stable and fast. Effect is still in dev preview btw. I don't see why not
Many thanks! Very informative :) Is this already in Angular 17? Or 17.1?
17.1
Thanks for this. I want to try and change a form builder to rather use signal inputs.The issue is in the test, even if I type the input correctly, the test gives an error. I tried with a simple number example.
questionNumber = input.required()
in the test
describe('Question input', ()=> {
it('should take in a input of type number', () => {
component.questionNumber = 5
})
})
I think it throwing an error, as you mentioned this is a ready only signal. Not sure how you would test it then?
I didn't use signals with forms. I don't think it will work or that forms are prepared to be used with signals. I would just leave forms as reactive for now.
Can I use signal input in my dump component when in smart component I use observable with async? is it ok?
Yes. input doesn't care how it gets value outside
Thanks, very usefull.
Angular team has really worked hard for this version but it seems to have neglected the SSR mode with the problem of accessing cookies from the server. This is a major problem of this version and remains unresolved since November. Unable to implement authentication on SSR. Do you have an alternative to this problem ?
Unfortunately no. I rarely use SSR for client projects
@@MonsterlessonsAcademy Whatever version, Angular always takes a crazy long time before the first client rendering. I tried several optimizations without success, that's why I turned to the SSR
Signals are awesome guys! Jump on the fun wagon and start programming naturally again 🎉
Yeap
angular rocks
Yeap
I try this but it doesn't work. whenever I change my @inputs to input signals, the template in my child component doesn't like the syntax? As if it doesn't recognize it right?
parent.component:
child.component:
objectArray = input();
This fails in the parent component template saying: Property objectArray is not provided by any applicable directives nor by element?
I can't find anything on this?
Working only from 17.2 and outputs from 17.3
Is DSA important in finding the job as a full stack developer
What is DSA?
Data structures and algorithm.