Categories
Technology

Angled suggestions make Ng Modules optional

The developers of Angular, a popular TypeScript-based web framework, are considering making NgModules an option. The goal is to shift Angular to a simpler reuse model to improve the developer experience.

RFC (request for comment) suggestions and titles on GitHub “Standalone components, directives, pipes — make Angular’s NGModule optional.” We aim to validate the intended design in the community, seek feedback, and enable experiments through non-production prototypes. The RFC will be posted on October 8th and will be completed by November 8th.

Core Angular concept, NgModules A container for features used to manage framework dependencies. If a component needs to use another component, directive, pipe, or provider, the dependencies are not directly referenced. Instead, an NgModule containing the exported components, directives, pipes, and configured providers is imported. As a result, developers need to create an NgModule to bootstrap even the simplest “Hello, World” applications.

RFC claims that Angular’s conceptual focus on NgModule has a negative impact on the developer experience. The RFC gives multiple reasons. Authoring components is more complicated than coding classes and templates.

The loading and rendering APIs are unnecessarily complex and easily misused.

Reading the component code is not enough to understand how the component works.

Angular tools need to handle “implicit” dependencies on the component’s NgModule context.

The RFC requires that components, directives, and pipes play a more central role, be self-contained, and move Angular in a direction that can be safely imported and used directly. This plan simplifies Angular’s “mental model”, enables new APIs for using components and directives (such as APIs for fine-grained lazy loading), and improves the ability of Angular tools to process code efficiently. Let me do it. Therefore, Angular is easy to use, easy to infer, low verbosity, and fast to compile.

The NgModule concept isn’t removed from Angular, but it’s an option for normal development tasks. At some point, the Angular development team can consider removing the NgModule altogether. On the other hand, the proposal emphasizes that NgModule will not be gone or deprecated. Developers can continue to create and use them. Angular itself keeps moving forward while the development team ponders the changes to the NgModule. Angular 13 Scheduled for next week, the transition to the Ivy compilation and rendering engine will be complete. Angular 12 Published June 24th, it also focuses on ivy. Copyright © 2021 IDG Communications, Inc.

https://www.infoworld.com/article/3638851/angular-proposal-would-make-ngmodules-optional.html#tk.rss_all Angled suggestions make Ng Modules optional

Leave a Reply

Your email address will not be published. Required fields are marked *