Analog's ng file format got renamed after some discrepancies in the community. Jeremy Elbourn was guest at the AngularAir podcast. Manfred Steyer published an article on DDD, and Tomasz Ducin on Angular Query.
.ng to .analog
The ng file format from the Analog project, which is a meta-framework to Angular, is no more. In short, the ng File is an alternative component/authoring format that focuses on the template part and is functional-based.
Why no more? Introducing a new feature from the community always differs from when it would come from Angular itself.
The ng file caused quite some friction, especially if the future should be functional or stay class-based.
Another element that caused some of the main points of confusion was the term "ng" itself. Some people understood that it might become part of the Angular framework itself.
Changing names instead of concepts is easy. That's why the Analog team removed the support for *.ng files and re-introduced them as *.analog format.
fix(vite-plugin-angular): remove experimental support for .ng files #869
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/analogjs/analog/blob/main/CONTRIBUTING.md#-commit-message-guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
Which package are you modifying?
- [x] vite-plugin-angular
- [ ] vite-plugin-nitro
- [ ] astro-angular
- [ ] create-analog
- [ ] router
- [ ] platform
- [ ] content
- [ ] nx-plugin
- [ ] trpc
What is the current behavior?
Experimental support for .ng
files was enabled through Analog
Closes #
What is the new behavior?
Support for .ng
files is removed
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
This was experimental in supporting an alternate way of authoring Angular components and directives. Despite various disclaimers, the .ng
file associated causes too much confusion that this is an Angular team project that intends to replace the usage of class components in Angular.
gif best describes this PR or how it makes you feel?
[optional] Whatfeat(vite-plugin-angular): enable `.analog` support #870
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/analogjs/analog/blob/main/CONTRIBUTING.md#-commit-message-guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
Which package are you modifying?
- [x] vite-plugin-angular
- [ ] vite-plugin-nitro
- [ ] astro-angular
- [ ] create-analog
- [ ] router
- [ ] platform
- [ ] content
- [ ] nx-plugin
- [ ] trpc
What is the new behavior?
This PR enables support for .analog
file extension via the supportAnalogFormat
flag under vite.experimental
.
This replaces the .ng
file extension support. With .analog
, the separation is clearer (and intentional). Level of support is around the same as .ng
with the following difference:
-
templateUrl
is now supported for external HTML file -
styleUrl
andstyleUrls
are now supported for external style file(s) -
<style>
(for inline style) is now converted tostyles
property in the Component metadata instead of prepend in the<template>
content- Multiple
<style>
is not guaranteed. If folks need multiple stylesheet, usestyleUrls
instead
- Multiple
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
gif best describes this PR or how it makes you feel?
[optional] WhatJeremy Elbourn at AngularAir
Jeremy Elbourn, Angular tech lead, was guest at the Angular Air Podcast. He doesn't see performance improvements or zoneless applications as the main benefit of Signals. To Jeremy, it is the better developer experience.
From his perspective, it would also make sense to un-deprecate ng-deep, a special CSS selector, and bring it back under a different name like ng-global.
Manfred Steyer on DDD
Manfred Steyer wrote an article about domain-driven design. He gave a historical overview and explained that DDD is not just about design patterns or functional vs. object-oriented programming.
We should see more the strategical aspect where, for example, the ubiquitous language plays a central part.
His article references many links to books, articles, and talks.
Tomasz Ducin on Angular Query
Tomasz Ducin published an article about Angular Query, which is also known as Tan Query. According to Tomas, it is a state-management library specifically designed to synchronize data with the backend. He explained the mental model behind it and its core concepts.
Angular Query is still in its early phases, and Thomas announced already that we can expect more article from him about this topic.
Top comments (4)
Thanks
No problem Lars
Thanks for sharing !
You're welcome!