Florian Spier

1.4K posts

Florian Spier banner
Florian Spier

Florian Spier

@spierala

Sr Engineer @PortofAntBruges | Angular | RxJS | Author of MiniRx Store https://t.co/9cbb8zESwe

Antwerpen, Belgien 가입일 Ağustos 2012
1.9K 팔로잉1.6K 팔로워
Florian Spier
Florian Spier@spierala·
In a NX workspace after running `nx migrate latest` there is this message after `npm i` "Angular CLI could not be decorated to enable computation caching. Please ensure @nx/workspace is installed." I wonder if it is an issue since the NX commands (serve, lint) are working...
English
1
0
1
3.3K
Matthieu Riegler
Matthieu Riegler@Jean__Meche·
@spierala @if @Switch Since v21.0, that migration is automatic and not opt-in anymore. The ngif/ngFor directives will be removed in the future.
English
1
0
10
582
Florian Spier
Florian Spier@spierala·
@VojtechMasek @if @Switch I just tried `ng update` again. The app was auto-migrated to the new control-flow. There is no way to opt out. Maybe something changed with ng 21.2 ?
English
1
0
0
113
Voj𝕥𝕖𝕔𝕙 Masek
Voj𝕥𝕖𝕔𝕙 Masek@VojtechMasek·
@spierala @if @Switch Updating Angular won't auto-migrate the control flow. There is separate (optional) migration for that. Also the structural directive based control flow will remain available. Ant in theory even it it was ever to be removed, you can still copy out these directives to your project
English
1
0
0
129
Florian Spier
Florian Spier@spierala·
Hey @ngbeconf, are there any plans for a 2025 edition of NG-BE? 🤞
English
0
1
1
625
Florian Spier
Florian Spier@spierala·
@Armandotrue App component never destroys. So no need to unsubscribe. When the browser window closes then the browser should clean up everything.
English
3
0
6
695
Armen Vardanyan
Armen Vardanyan@Armandotrue·
Serious questino to which I'm unsure if I have an answer Do we actually need to unsubscribe from Observables in the root component? 🧐
Armen Vardanyan tweet media
English
17
0
28
5.3K
Florian Spier
Florian Spier@spierala·
@Armandotrue In my experience ngOnInit was rarely really needed. One use case was to wait for @Input properties being ready. But if there is no reason to wait just declare the property directly. Less code, less Angular magic.
English
2
0
4
330
Armen Vardanyan
Armen Vardanyan@Armandotrue·
With #Angular signals, one of my most hated patterns will go away Just ditch the lifecycle methods!
Armen Vardanyan tweet media
English
12
3
66
5.1K
Florian Spier
Florian Spier@spierala·
@insanicae @Dutch_Guy @NxDevTools And the Angular dependency seems to be managed again by Nx... Now nx migrate also updates Angular as expected :) In the future I will be more careful with --interactive 😃
English
1
0
0
56
Florian Spier
Florian Spier@spierala·
Is it normal that Nx workspace does not migrate to a higher Angular version anymore? At least `nx migrate latest --interactive` used to ask if I want to upgrade Angular etc. Our project is using Nx 20.4.5 and Angular 18.2 The migrate command seems to update only Nx itself.
English
3
0
3
617
Florian Spier
Florian Spier@spierala·
@markgoho nx migrate latest creates a migrations.json... But running that migrations does not upgrade Angular.
English
0
0
0
23
Mark Goho
Mark Goho@markgoho·
@spierala then something is definitely off -- maybe try without the interactive flag? `nx migrate latest` should absolutely be producing a migrations.json file that has all of the changes to your workspace and angular to get you on the latest version of both
English
1
0
0
20
Florian Spier
Florian Spier@spierala·
@Dutch_Guy CLI I tried several times the same command (nx migrate nx@20.4) without success.
English
1
0
1
66
Mark Goho
Mark Goho@markgoho·
@spierala nx migrate creates a list of migrations, then you have to run those migrations
English
1
0
2
48
Florian Spier
Florian Spier@spierala·
@Dutch_Guy I just tried `nx migrate nx@20.4` and it does not update Angular. These are the only changes...
Florian Spier tweet media
English
1
0
0
94
Florian Spier
Florian Spier@spierala·
@eugeniyoz 🤔 What about ViewEncapsulation.None (which makes the component styling also global)? Why isn't it discouraged?
Florian Spier tweet media
English
1
0
1
111
🪄 Evgeniy OZ 🎩
🪄 Evgeniy OZ 🎩@eugeniyoz·
@spierala Because it is located in one component, but affects others, which should not happen by default. It is better to declare some global rule in the global style.css.
English
1
0
3
167
Florian Spier
Florian Spier@spierala·
Why is Angular so strongly against ::ng-deep? If you read the docs, you almost do not dare to use it anymore. But I think in some rare cases it is fine to use it.
Florian Spier tweet media
English
4
1
6
1.1K