Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Ng-News 25/14: Selectorless PR

Автор: ng-news

Загружено: 2025-04-10

Просмотров: 1965

Описание:

Selectorless aims to eliminate the need for selectors in templates by referencing components directly via class names. A first PR has been merged, which shows the initial direction Angular is taking toward this feature.

Selectorless

Standalone components were introduced in Angular 14. They removed the abstraction of NgModules, which had caused some trouble for the compiler.
To figure out a component’s dependencies, the compiler first had to find the NgModule, which was usually in another file.

Modern bundlers are built for single-file compilation, which makes parallel builds possible. A perfect setup is if a file includes everything it needs, like its dependencies.

On the path towards single-file compilation, another obstacle, namely the selector, will be removed.

A component’s template uses selectors to reference its dependencies. The corresponding classes are imported in the TypeScript file, but that's not enough. Just having the name of the class doesn't tell anything about its selector.

So in order to find out the selector of that dependency, the compiler needs to access the classes' filename and therefore break single-file compilation.

The compiler needs to know what class is behind the selector app-home. With the information in this file, it is not possible to tell if it is ComponentA or CompomentB. So the compiler needs to traverse the imports to find the right class.

The fix is simple. Why use a selector at all? Just reference the class directly in the template. That's the same thing we've been doing in TypeScript all the time.

Additionally, if it is clear what class is used in the template, it is also more straightforward for the runtime, which leads to better performance.

And this is exactly what selectorless is all about.

Selectorless is in a very early stage. Eventually, we will get an RFC with much more details.

https://gist.github.com/mgechev/1cba2...

https://github.com/angular/angular/pu...

  / mgechev_angular-typescript-programming-act...  

https://x.com/Jean__Meche/status/1907...

Q&A Session

At the monthly Q&A session, Jeremy Elbourn briefly touched on the router in the context of making RxJS optional in Angular.

He mentioned that there won’t be a full rewrite of the router, but that the current router state might be exposed as a Signal in the future.
Time Position: 1:18:40

https://www.youtube.com/live/UnT_ojF5...

Zoneless in Developer Preview?

A PR landed, which will make zoneless leaving its experimental status, which it had since Angular 18. Chances are high, that this PR makes it into Angular 20.

https://github.com/angular/angular/pu...

Nx Remote Caching

Nx, an alternative to the Angular CLI, provides an option for a centralized build cache. That means, once a build is available, it is cached, and if the underlying code didn't change at all, subsequent builds can be served by the cache.

There have been some discussions about closing the API which allows writing the build cache on your own. That is now off the table. We will get a new API where we can write our self-hosted caches for free.

https://nx.dev/remote-cache

`httpResource` at Angular Catch-Up

Alex Rickabaugh was guest at the Angular Catch-Up podcast and talked about the new function httpResource.

Alex mentioned that resource is not already "state management" but an API for the existing state management libraries and they should use it to implement their approach to that problem.

He also mentioned that we have to remember that httpResource is eagerly loaded and not lazily like Observables.

https://www.podbean.com/ew/pb-4th8u-1...

Fakes over Mocks

Last but not least, there has also been an article by Younes Jaaidi about testing. He suggests to lean more towards fakes instead of mocks for test doubles and illustrated his argument with some quite eye-opening examples.

https://cookbook.marmicode.io/angular...

ng-de Dates

The German Angular conference, ng-de, has announced its dates. It is going to be on November 5th to 7th and the CFP has also opened.

https://ng-de.org/

Ng-News 25/14: Selectorless PR

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Ng-News 25/15: Native Observables

Ng-News 25/15: Native Observables

Angular v18 release recap

Angular v18 release recap

Ng-News 25/50: Автоматическое удаление для поставщиков маршрутизаторов и Signal Forms

Ng-News 25/50: Автоматическое удаление для поставщиков маршрутизаторов и Signal Forms

Ng-News 25-47: Angular 21

Ng-News 25-47: Angular 21

Ng-News 25/45: Аналог v2, устранение дребезга в SignalForms, тестирование и время

Ng-News 25/45: Аналог v2, устранение дребезга в SignalForms, тестирование и время

Data Engineer ≠ программист | Кто такой Дата инженер?

Data Engineer ≠ программист | Кто такой Дата инженер?

Как Cursor переворачивает разработку и может погубить Github

Как Cursor переворачивает разработку и может погубить Github

Ng-News 25/44: Состав ресурсов

Ng-News 25/44: Состав ресурсов

Ng-News 25/43: Vitest - Angular's New Testing Framework

Ng-News 25/43: Vitest - Angular's New Testing Framework

Диктатура ремесленников: В чём проблема

Диктатура ремесленников: В чём проблема "Фредгитариста" и профессоров?

Акунин ошарашил прогнозом! Финал войны уже решён — Кремль скрывает правду

Акунин ошарашил прогнозом! Финал войны уже решён — Кремль скрывает правду

Крупнейшая образовательная катастрофа 20 века в США

Крупнейшая образовательная катастрофа 20 века в США

Хаос в Китае: Apple, Amazon и BMW бегут. Почему начался промышленный обвал?

Хаос в Китае: Apple, Amazon и BMW бегут. Почему начался промышленный обвал?

Я вернул себе фокус (вот, что реально сработало)

Я вернул себе фокус (вот, что реально сработало)

resource(), rxResource(), httpResource(): Why????

resource(), rxResource(), httpResource(): Why????

Ng-News 25/12: Nx Angular Week, Deprecation PR *ngIf/For/Switch

Ng-News 25/12: Nx Angular Week, Deprecation PR *ngIf/For/Switch

ОБЗОР РЕФЛЕКСИИ В С++26

ОБЗОР РЕФЛЕКСИИ В С++26

КАК НЕЛЬЗЯ ХРАНИТЬ ПАРОЛИ (и как нужно) за 11 минут

КАК НЕЛЬЗЯ ХРАНИТЬ ПАРОЛИ (и как нужно) за 11 минут

Линус Торвальдс в ярости из-за предложения RISC-V

Линус Торвальдс в ярости из-за предложения RISC-V

Будет ли встраиваемые системы по-прежнему привлекательной карьерой в 2026 году?

Будет ли встраиваемые системы по-прежнему привлекательной карьерой в 2026 году?

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]