Good practices
- Use standalone components instead of NgModules.
- Use control flow in templates instead of NgIf directive.
- Use input for passing data parameters to components instead of @Input.
- Use public attributes for components and avoid using
public
keyword to enforce concision. [TODO: add references]
The future of Angular
- There are talks about removing
ngOnInit
lifecycle hook but further investigation needs to be done about this. More info
TODO
- How to solve children routing inside standalone components?
- Move Best Practices into specific article
Signals
TODO Move to an independent post.
Moving a native fetch into an RxJS Observable
TODO create an specific RxJS page TODO create an specific page for this issue
return new Observable((observer: Subscriber<T>) => {
fetch(url)
.then((response) => response.json())
.then((data) => {
observer.next(data);
observer.complete();
})
.catch((err) => observer.error(err));
});
Issues
- Angular doesn't support .env files by default => R&D best solution to work with .env files