Explore tweets tagged as #AngularTip
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! Add helper functions to your injection tokens so that consumers can easily provide it with one line with a type-safe value:.
Tweet media one
2
14
73
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! Want to use CSS :invalid selector with #Angular reactive forms? Create a little directive to toggle validity on the native HTML element:.
Tweet media one
3
11
90
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! While I think browsers should just do that on their own, I present you a simple directive to be able to copy 'select' value. Keep in mind blitz will not work due to permissions and iframe:.
Tweet media one
2
18
95
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! Ever wanted your outputs to bubble? You can achieve similar result using native CustomEvent. Not typesafe, unfortunately, but check out the example below:.
Tweet media one
0
6
53
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! Create a fancy fadeout effect for overflown content utilizing CSS masking:.
Tweet media one
0
2
21
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! Want to use styles with directives? Create a dummy component that stores the styles and a small helper to use in one line inside your directive. See it in action:.
Tweet media one
4
13
81
@Waterplea
Alex Inkin
4 months
#AngularTip for the day! Use Angular animations + a neat #CSS grid trick to implement perfect crossfade:.
Tweet media one
1
6
74
@Waterplea
Alex Inkin
1 year
#AngularTip for the day! Add a small ResizeObserver based event manager plugin to your @Angular app and be able to watch for elements changing dimensions with ease:.
Tweet media one
1
14
91
@Waterplea
Alex Inkin
1 year
#AngularTip for the day! Want to be able to declaratively control inputs/public properties of `hostDirectives` from your components? With signals it is possible with a simple wrapper, check it out:.
Tweet media one
0
9
61
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! With `display: contents` you can plug your components where it would otherwise cause invalid layout, like inside of tables:.
Tweet media one
3
4
47
@Waterplea
Alex Inkin
5 months
#AngularTip for the day! Did you know you can create dynamic components on existing DOM elements? This way you can have a directive with certain logic you always need, but the visual representation can be provided with DI as dynamic component. Check it out.
Tweet media one
2
11
102
@Waterplea
Alex Inkin
2 years
#AngularTip for the day! Need a way to control `hostDirective` from a host? Create a decorator that injects the directive and updates the value! No getters unfortunately, since hostDirectives run their lifecycles first and we end up with ExpressionChanged.
Tweet media one
Tweet media two
0
7
57
@Waterplea
Alex Inkin
2 months
#AngularTip for the day! Are you sad to see MARQUEE tag deprecated? With a few lines of #CSS and literally one line of #JavaScript you can make a running text smooth as butter:.
Tweet media one
3
7
58
@Waterplea
Alex Inkin
5 months
#AngularTip for the day! Need to know when an input value is changed programmatically? Combine some black magic of prototype patching with CustomEvent:.
Tweet media one
Tweet media two
3
6
77
@vishwaSayambar
Vishwajit Sayambar
2 years
That's all for now, stay tuned for more updates😍.I hope this helps!.Happy coding!.πŸ”” Follow.@vishwaSayambar.For: 🌐 Web Development content. #100DaysOfCode #learning #Angular #100daysofcodechallenge.#angular #angulardeveloper #learner #tips #react #angulartip
Tweet media one
0
0
4
@Waterplea
Alex Inkin
1 year
#AngularTip of the day! Let's do one last thing, while we're at it β€” you can listen to host directives outputs as signals in your #Angular components with this simple helper. Check it out:.For more context, take a look at my previous tweet πŸ˜‰
Tweet media one
1
4
38
@shhdharmen
Dharmen Shah 😎
3 months
Did you know?. In @angular, to get static attribute value, you can use HostAttributeToken class!. #Angular #AngularTip #WebDev
Tweet media one
4
15
87
@sSaXxZz
srichardson23
2 years
When working with Angular, remember to leverage the power of observables for asynchronous operations like HTTP requests. Use operators like switchMap, catchError, and tap to handle and transform the data effectively. Happy coding! #AngularTip #rxjs #AsynchronousProgramming.
0
0
1
@shhdharmen
Dharmen Shah 😎
3 months
Did you know?. In @angular, you can use viewChild() to access any provider defined in the child component tree. Take a look at below example:. #AngularTip #WebDev #Angular #LearnAngular
Tweet media one
3
6
45
@shhdharmen
Dharmen Shah 😎
3 months
Fix your control-flow syntax formatting in @angular html templates using @PrettierCode . #Angular #AngularTip #WebDev
Tweet media one
2
10
87