{"id":6797,"date":"2023-01-12T09:52:24","date_gmt":"2023-01-12T08:52:24","guid":{"rendered":"https:\/\/www.angulararchitects.io\/?p=6797"},"modified":"2023-09-04T12:57:26","modified_gmt":"2023-09-04T10:57:26","slug":"modern-and-lightweight-angular-architectures-with-angulars-latest-innovations","status":"publish","type":"post","link":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/","title":{"rendered":"Modern and Lightweight Angular Architectures With Angular&#8217;s Latest Innovations"},"content":{"rendered":"<p>In the last time, Angular has received several new features that make it possible to use the framework in a fresh and lightweight way. This article series shows how these innovations help make our solutions more maintainable.<\/p>\n<p>The examples used can be found under <a href=\"https:\/\/github.com\/manfredsteyer\/standalone-example-cli.git\">Example<\/a>.<\/p>\n<h2>Standalone Components<\/h2>\n<p>I start with what is probably the biggest innovation of the last releases: the long-awaited Standalone Components. Since they do not need <code>NgModules<\/code>, there are no unneeded indirection anymore. This makes the application a more lightweight. To tell Angular that a Component is standalone, set the <code>standalone<\/code> flag to <code>true<\/code>:<\/p>\n<pre><code class=\"language-typescript\">@Component({\n  standalone: true,\n  imports: [\n    NgIf,\n    NgForOf,\n    AsyncPipe,\n    JsonPipe,\n\n    FormsModule, \n    FlightCardComponent,\n    CityValidator,\n  ],\n  selector: &#039;flight-search&#039;,\n  templateUrl: &#039;.\/flight-search.component.html&#039;\n})\nexport class FlightSearchComponent {\n    private store = inject(Store);\n    readonly flights$ = this.store.select(selectFilteredFlights);\n\n    [\u2026]\n}<\/code><\/pre>\n<p>In addition, it is now necessary to provide the compilation context via the new <code>imports<\/code> array. This includes all other components, but also directives and pipes that are used in the template of the Standalone Component. Existing <code>NgModules<\/code> can also be imported. This is necessary to continue supporting existing code. The Angular team thus avoids breaking changes.<\/p>\n<p>Also, even the building blocks supplied with Angular are not yet completely free of <code>NgModules<\/code>. The example shown partially reflects this: While the components of the <code>CommonModule<\/code>, including <code>NgIf<\/code>, <code>NgFor<\/code>, <code>AsyncPipe,<\/code> and <code>JsonPipe<\/code> are now standalone, this is not yet the case with the <code>FormsModule<\/code>.<\/p>\n<p>The previous example also shows another innovation that makes Angular solutions lighter: Dependencies can now be injected directly into properties using <code>inject<\/code>. The component does not have to introduce its own constructor for this.<\/p>\n<p>More details about <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/angulars-future-without-ngmodules-lightweight-solutions-on-top-of-standalone-components\/\">Standalone Components<\/a> can be found <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/angulars-future-without-ngmodules-lightweight-solutions-on-top-of-standalone-components\/\">here<\/a>.<\/p>\n<h2>inject and the EcmaScript Standard<\/h2>\n<p>Using <code>inject<\/code> also has another not-so-obvious benefit: the injected dependency can provide default values for other properties. In the example shown, the injected <code>store<\/code> returns a default value for <code>flights$<\/code>.<\/p>\n<p>In the past, this also worked with dependencies injected via the constructor. However, this procedure is not EcmaScript-compliant! EcmaScript first populates the properties with default values and only then executes the constructor. TypeScript now follows this specification. However, most Angular don\\'t recognize this behavior because the Angular CLI activates the original behavior with a flag in the TypeScript configuration. With <code>inject<\/code>, on the other hand, we are per se standard-compliant and on the safe side even without this setting!<\/p>\n<h2>Bootstrapping a Standalone Component<\/h2>\n<p>The bootstrapping of the application is also easier thanks to standalone components: You only have to transfer the <code>AppComponent<\/code> to <code>bootstrapApplication<\/code>. Global providers can be set up using the second argument:<\/p>\n<pre><code class=\"language-typescript\">bootstrapApplication(AppComponent, {\n  providers: [\n    provideHttpClient(\n      withInterceptors([authInterceptor]),\n    ),\n    provideRouter(APP_ROUTES, \n      withPreloading(PreloadAllModules),\n    ),\n    provideLogger({ debug: true }, \n          CustomLogFormatter);\n  ]\n}<\/code><\/pre>\n<p>Both the <code>HttpClient<\/code> and the router now come with helper functions for setting up the required global providers. The Angular team follows the <code>provideXYZ<\/code> naming pattern, which it also recommends for third-party libraries. The example shown also applies this pattern to a custom logger library. The next section shows how to create such a function for setting up your own library.<\/p>\n<h2>Own Provide Functions<\/h2>\n<p>Actually, <code>provide<\/code> functions for setting up libraries are nothing special. They accept the configuration parameters and return an array with providers:<\/p>\n<pre><code class=\"language-typescript\">export function provideLogger(config: LoggerConfig, \n        formatterClass: Type&lt;LogFormatter&gt;): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {\n      provide: LoggerConfig,\n      useValue: config,\n    },\n    {\n      provide: LogFormatter,\n      useClass: formatterClass,\n    },\n  ]);\n}<\/code><\/pre>\n<p>However, the Angular team does not use the <code>Provider[]<\/code> type for the return value, but rather <code>EnvironmentProviders<\/code>. Using the type system, this procedure ensures that the providers supplied can only be registered together with <code>bootstrapApplication<\/code> and within router configurations. However, this excludes registration as a local provider within a component. This is important since most libraries are shared between multiple components. To create this type, Angular provides the <code>makeEnvironmentProviders<\/code> function.<\/p>\n<p><a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/patterns-for-custom-standalone-apis-in-angular\/\">More details on custom provide function<\/a> can be found in my <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/patterns-for-custom-standalone-apis-in-angular\/\">article here<\/a>.<\/p>\n<h2>Functional Interceptors<\/h2>\n<p>One of the most powerful features of the <code>HttpClient<\/code> are interceptors. They provide central routines that can process all outgoing HTTP requests and incoming HTTP responses.<\/p>\n<p>Originally, these were services that were to be provided via a multi-provider. However, when revising the <code>HttpClient<\/code>, which became necessary as part of the switch to standalone components, the Angular team created a lighter variant: functional interceptors.<\/p>\n<p>These are simple functions that take the current HTTP request and a reference called <code>next<\/code>. This reference points either to another interceptor, if one exists, or to the logic that takes care of the desired HTTP request:<\/p>\n<pre><code class=\"language-typescript\">export const authInterceptor: HttpInterceptorFn = (req, next) =&gt; {\n\n    if (req.url.startsWith(&#039;https:\/\/demo.angulararchitects.io\/api\/&#039;)) {\n        \/\/ Setting a dummy token for demonstration\n        const headers = req.headers.set(&#039;Authorization&#039;, &#039;Bearer Auth-1234567&#039;);\n        req = req.clone({headers});\n    }\n\n    return next(req).pipe(\n        tap(resp =&gt; console.log(&#039;response&#039;, resp))\n    );\n}<\/code><\/pre>\n<p>In order to make the application\\'s functional interceptor known, it must be passed to <code>provideHttpClient<\/code> (see example above). The originally necessary packaging into a service and registration via a multi-provider is no longer necessary.<\/p>\n<p>More details about <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/the-refurbished-httpclient-in-angular-15-standalone-apis-and-functional-interceptors\/\">Functional Interceptors and the Standalone API for the HttpClient<\/a> can be found <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/the-refurbished-httpclient-in-angular-15-standalone-apis-and-functional-interceptors\/\">here<\/a>.<\/p>\n<h3>More: Angular Architecture Workshop (online, interactive, advanced)<\/h3>\n<p>Become an expert for enterprise-scale and maintainable Angular applications with our <a href=\"https:\/\/www.angulararchitects.io\/en\/angular-workshops\/advanced-angular-enterprise-architecture-incl-ivy\/\">Angular Architecture workshop!<\/a><img decoding=\"async\" src=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/06\/ent-en-1.jpg\" alt=\"\" \/><\/p>\n<p><a href=\"https:\/\/www.angulararchitects.io\/en\/angular-workshops\/advanced-angular-enterprise-architecture-incl-ivy\/\">All Details (English Workshop)<\/a> | <a href=\"https:\/\/www.angulararchitects.io\/schulungen\/advanced-angular-enterprise-anwendungen-und-architektur\/\">All Details (German Workshop)<\/a><\/p>\n<h2>Functional Guards and Resolvers<\/h2>\n<p>Similar to interceptors, guards and resolvers can now also be just functions. In cases where these constructs only delegate to services, they can even be reduced to a one-liner:<\/p>\n<pre><code class=\"language-typescript\">export const APP_ROUTES: Routes = [\n    [\u2026]\n    {\n        path: &#039;flight-booking&#039;,\n        canActivate: [() =&gt; inject(AuthService).isAuthenticated()],\n        resolve: {\n          config: () =&gt; inject(ConfigService).loaded$,\n        },\n        loadChildren: () =&gt;\n            import(&#039;.\/booking\/flight-booking.routes&#039;)\n               \/\/ .then(m =&gt; m.FLIGHT`BOOKING`ROUTES)\n    },\n    [\u2026]\n]<\/code><\/pre>\n<p>In the example shown, a <code>canActivate<\/code> guard prevents unauthenticated users from activating a route. To do this, it delegates to the <code>AuthService<\/code> , which can be obtained via <code>inject<\/code> .<\/p>\n<p>The resolver is similar: it delays the activation of the route until a configuration has been loaded. It also obtains the <code>ConfigService<\/code> required for this via <code>inject<\/code>.<\/p>\n<p>This example also shows another new possibility that has also shortened lazy loading somewhat since Angular 15: The <code>loadChildren<\/code> property now uses the default expert. A projection onto the desired export indicated in the source code comment is no longer necessary.<\/p>\n<p>More Details on <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/routing-and-lazy-loading-with-standalone-components\/\">Routing With Standalone Components<\/a> can be found <a href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/routing-and-lazy-loading-with-standalone-components\/\">here<\/a>.<\/p>\n<h2>Host Directives<\/h2>\n<p>The host directives introduced with Angular 15 allow reusable features to be included in components and directives. These are directives that are imported directly into other components and directives. There is now a new property <code>hostDirectives<\/code> in the directive and component decorator:<\/p>\n<pre><code class=\"language-typescript\">@Component({\n  selector: &#039;tickets-flight-lookup&#039;,\n  standalone: true,\n  hostDirectives: [LifeCycle],\n  [\u2026]\n})\nexport class FlightLookupComponent implements OnInit {\n  facade = inject(FlightLookupFacade);\n  lifeCycle = inject(LifeCycle);\n\n  flights$ = this.facade.flights$;\n\n  ngOnInit(): void {\n\n    this.flights$.pipe(takeUntil(this.lifeCycle.destroy$))\n        .subscribe((v) =&gt; {\n          console.log(&#039;online&#039;, v);\n        });\n  }\n}<\/code><\/pre>\n<p>An interesting feature of host directives is that they share the lifecycle with the consuming component or directive, but also that they can be injected like traditional services. This allows, for example, the provision of observables that represent life cycle hooks. Such constructs make it easier, among other things, to close resources using <code>takeUntil<\/code>, as shown in the previous example. The implementation of the host directive used for this can be found in the next one:<\/p>\n<pre><code class=\"language-typescript\">@Directive({\n  standalone: true,\n})\nexport class LifeCycle implements [\u2026], OnDestroy {\n  [\u2026]\n\n  private destroySubject = new Subject&lt;void&gt;();\n  readonly destroy$ = this.destroySubject.asObservable();\n\n  [\u2026]\n\n  ngOnDestroy(): void {\n    this.destroySubject.next();\n  }\n}<\/code><\/pre>\n<h2>Another Small Step: Self-Closing Tags<\/h2>\n<p>Another small new feature that helps to make our solutions more lightweight is self-closing tags. Beginning with Angular 15.1.0 we can now write<\/p>\n<pre><code class=\"language-html\">&lt;flight-card [item]=&quot;f&quot; [(selected)]=&quot;basket[f.id]&quot; \/&gt;<\/code><\/pre>\n<p>instead of<\/p>\n<pre><code class=\"language-html\">&lt;flight-card [item]=&quot;f&quot; [(selected)]=&quot;basket[f.id]&quot;&gt;\n&lt;\/flight-card&gt;<\/code><\/pre>\n<p>Obviously, this is a tiny new feature. However, it\\'s another piece in the mosaic of more lightweight applications.<\/p>\n<h2>What\\'s next? More on Architecture!<\/h2>\n<p>Please find more information on enterprise-scale Angular architectures in our free eBook (5th edition, 12 chapters):<\/p>\n<ul>\n<li>According to which criteria can we subdivide a huge application into sub-domains?<\/li>\n<li>How can we make sure, the solution is maintainable for years or even decades?<\/li>\n<li>Which options from Micro Frontends are provided by Module Federation?<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.angulararchitects.io\/book\"><img decoding=\"async\" src=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2022\/12\/cover-5th-small.png\" alt=\"free\" \/><\/a><\/p>\n<p>Feel free to <a href=\"https:\/\/www.angulararchitects.io\/en\/book\">download it here<\/a> now!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Angular has received several new features that make it possible to use the framework in a fresh and lightweight way.<\/p>\n","protected":false},"author":9,"featured_media":6845,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-6797","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Modern and Lightweight Angular Architectures With Angular&#039;s Latest Innovations - ANGULARarchitects<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Modern and Lightweight Angular Architectures With Angular&#039;s Latest Innovations - ANGULARarchitects\" \/>\n<meta property=\"og:description\" content=\"Angular has received several new features that make it possible to use the framework in a fresh and lightweight way.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\" \/>\n<meta property=\"og:site_name\" content=\"ANGULARarchitects\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-12T08:52:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-04T10:57:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sm.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Manfred Steyer, GDE\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"Angular has received several new features that make it possible to use the framework in a fresh and lightweight way.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sm.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@daniel\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manfred Steyer, GDE\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\"},\"author\":{\"name\":\"Manfred Steyer, GDE\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951\"},\"headline\":\"Modern and Lightweight Angular Architectures With Angular&#8217;s Latest Innovations\",\"datePublished\":\"2023-01-12T08:52:24+00:00\",\"dateModified\":\"2023-09-04T10:57:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\"},\"wordCount\":1084,\"publisher\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\",\"name\":\"Modern and Lightweight Angular Architectures With Angular's Latest Innovations - ANGULARarchitects\",\"isPartOf\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg\",\"datePublished\":\"2023-01-12T08:52:24+00:00\",\"dateModified\":\"2023-09-04T10:57:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage\",\"url\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg\",\"contentUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg\",\"width\":1000,\"height\":395},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.angulararchitects.io\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Modern and Lightweight Angular Architectures With Angular&#8217;s Latest Innovations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#website\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/\",\"name\":\"ANGULARarchitects\",\"description\":\"AngularArchitects.io\",\"publisher\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.angulararchitects.io\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\",\"name\":\"ANGULARarchitects\",\"alternateName\":\"SOFTWAREarchitects\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg\",\"contentUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg\",\"width\":644,\"height\":216,\"caption\":\"ANGULARarchitects\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/github.com\/angular-architects\",\"https:\/\/www.linkedin.com\/company\/angular-architects\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951\",\"name\":\"Manfred Steyer, GDE\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g\",\"caption\":\"Manfred Steyer, GDE\"},\"sameAs\":[\"https:\/\/x.com\/daniel\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Modern and Lightweight Angular Architectures With Angular's Latest Innovations - ANGULARarchitects","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/","og_locale":"en_US","og_type":"article","og_title":"Modern and Lightweight Angular Architectures With Angular's Latest Innovations - ANGULARarchitects","og_description":"Angular has received several new features that make it possible to use the framework in a fresh and lightweight way.","og_url":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/","og_site_name":"ANGULARarchitects","article_published_time":"2023-01-12T08:52:24+00:00","article_modified_time":"2023-09-04T10:57:26+00:00","og_image":[{"width":1000,"height":500,"url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sm.jpg","type":"image\/jpeg"}],"author":"Manfred Steyer, GDE","twitter_card":"summary_large_image","twitter_description":"Angular has received several new features that make it possible to use the framework in a fresh and lightweight way.","twitter_image":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sm.jpg","twitter_creator":"@daniel","twitter_misc":{"Written by":"Manfred Steyer, GDE","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#article","isPartOf":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/"},"author":{"name":"Manfred Steyer, GDE","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951"},"headline":"Modern and Lightweight Angular Architectures With Angular&#8217;s Latest Innovations","datePublished":"2023-01-12T08:52:24+00:00","dateModified":"2023-09-04T10:57:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/"},"wordCount":1084,"publisher":{"@id":"https:\/\/www.angulararchitects.io\/en\/#organization"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage"},"thumbnailUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/","url":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/","name":"Modern and Lightweight Angular Architectures With Angular's Latest Innovations - ANGULARarchitects","isPartOf":{"@id":"https:\/\/www.angulararchitects.io\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage"},"thumbnailUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg","datePublished":"2023-01-12T08:52:24+00:00","dateModified":"2023-09-04T10:57:26+00:00","breadcrumb":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#primaryimage","url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg","contentUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/01\/sujet-1-1.jpg","width":1000,"height":395},{"@type":"BreadcrumbList","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/modern-and-lightweight-angular-architectures-with-angulars-latest-innovations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.angulararchitects.io\/en\/"},{"@type":"ListItem","position":2,"name":"Modern and Lightweight Angular Architectures With Angular&#8217;s Latest Innovations"}]},{"@type":"WebSite","@id":"https:\/\/www.angulararchitects.io\/en\/#website","url":"https:\/\/www.angulararchitects.io\/en\/","name":"ANGULARarchitects","description":"AngularArchitects.io","publisher":{"@id":"https:\/\/www.angulararchitects.io\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.angulararchitects.io\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.angulararchitects.io\/en\/#organization","name":"ANGULARarchitects","alternateName":"SOFTWAREarchitects","url":"https:\/\/www.angulararchitects.io\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg","contentUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg","width":644,"height":216,"caption":"ANGULARarchitects"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/github.com\/angular-architects","https:\/\/www.linkedin.com\/company\/angular-architects\/"]},{"@type":"Person","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951","name":"Manfred Steyer, GDE","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g","caption":"Manfred Steyer, GDE"},"sameAs":["https:\/\/x.com\/daniel"]}]}},"_links":{"self":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/6797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/comments?post=6797"}],"version-history":[{"count":1,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/6797\/revisions"}],"predecessor-version":[{"id":22323,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/6797\/revisions\/22323"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/media\/6845"}],"wp:attachment":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/media?parent=6797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/categories?post=6797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/tags?post=6797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}