{"id":1908,"date":"2024-10-22T21:21:46","date_gmt":"2024-10-22T19:21:46","guid":{"rendered":"https:\/\/epicmarketing.co.il\/notebook\/?p=1908"},"modified":"2024-12-24T14:12:50","modified_gmt":"2024-12-24T12:12:50","slug":"whats-new-in-angular-16-17-18","status":"publish","type":"post","link":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/","title":{"rendered":"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u05db\u05d9\u05d5\u05dd (22.10.24) \u05d4\u05d2\u05e8\u05e1\u05d4 \u05d4\u05e2\u05d3\u05db\u05e0\u05d9\u05ea \u05e9\u05dc \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 \u05d4\u05d9\u05d0 18. \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5 \u05db\u05ea\u05d1\u05ea\u05d9 \u05d1\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15, \u05d0\u05db\u05ea\u05d5\u05d1 \u05e2\u05dc \u05d4\u05de\u05e2\u05d1\u05e8 \u05d5\u05de\u05d4 \u05e9\u05d5\u05e0\u05d4 \u05d1\u05d2\u05e8\u05e1\u05d0\u05d5\u05ea \u05e9\u05e2\u05d1\u05e8\u05d5 \u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Standalone Components by Default<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 <\/strong>&#8211; standalone components \u05d4\u05d9\u05d5 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd, \u05d0\u05d1\u05dc \u05dc\u05d0 \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. \u05e2\u05d3\u05d9\u05d9\u05df \u05d4\u05d9\u05d4 \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05de\u05d5\u05d3\u05d5\u05dc \u05d0\u05d7\u05d3 \u05dc\u05e4\u05d7\u05d5\u05ea.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app.module.ts\nimport { NgModule } from &#039;@angular\/core&#039;;\nimport { BrowserModule } from &#039;@angular\/platform-browser&#039;;\nimport { AppComponent } from &#039;.\/app.component&#039;;\nimport { MyComponent } from &#039;.\/my.component&#039;;\n\n@NgModule({\n  declarations: &#x5B;AppComponent, MyComponent],\n  imports: &#x5B;BrowserModule],\n  providers: &#x5B;],\n  bootstrap: &#x5B;AppComponent],\n})\nexport class AppModule {}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong> &#8211; standalone components \u05e0\u05d5\u05e6\u05e8\u05d9\u05dd \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ my.component.ts\nimport { Component } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-my-component&#039;,\n  template: `&lt;p&gt;My Component works!&lt;\/p&gt;`,\n  standalone: true,\n})\nexport class MyComponent {}\n\n\/\/ main.ts\nimport { bootstrapApplication } from &#039;@angular\/platform-browser&#039;;\nimport { AppComponent } from &#039;.\/app.component&#039;;\n\nbootstrapApplication(AppComponent);\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Signal-Based Reactivity<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong> &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-rxjs \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e2\u05e7\u05d5\u05d1 \u05d0\u05d7\u05e8\u05d9 \u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd \u05e9\u05e7\u05d5\u05e8\u05d9\u05dd \u05d1\u05d3\u05e3, \u05e9\u05d9\u05ea\u05d5\u05e3 \u05e9\u05dc \u05de\u05d9\u05d3\u05e2 \u05d1\u05d9\u05df \u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d5\u05ea, \u05e7\u05d1\u05dc\u05ea \u05de\u05d9\u05d3\u05e2 \u05de-API \u05d5\u05db\u05d5' \u05db-reactive.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ counter.component.ts\nimport { Component } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-counter&#039;,\n  template: `\n    &lt;p&gt;Count: {{ count }}&lt;\/p&gt;\n    &lt;button (click)=&quot;increment()&quot;&gt;Increment&lt;\/button&gt;\n  `,\n})\nexport class CounterComponent {\n  count = 0;\n\n  increment() {\n    this.count++;\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong> &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-Signals.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ counter.component.ts\nimport { Component, signal } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-counter&#039;,\n  template: `\n    &lt;p&gt;Count: {{ count() }}&lt;\/p&gt;\n    &lt;button (click)=&quot;increment()&quot;&gt;Increment&lt;\/button&gt;\n  `,\n  standalone: true,\n})\nexport class CounterComponent {\n  count = signal(0);\n\n  increment() {\n    this.count.update((value) =&gt; value + 1);\n  }\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Dependency Injection Enhancements with DestroyRef<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 <\/strong>&#8211; \u05e0\u05d9\u05e7\u05d9\u05d5\u05df \u05e9\u05dc \u05de\u05e9\u05d0\u05d1\u05d9\u05dd \u05d1\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05ea ngOnDestroy<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ my.service.ts\nimport { Injectable, OnDestroy } from &#039;@angular\/core&#039;;\nimport { Subscription } from &#039;rxjs&#039;;\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class MyService implements OnDestroy {\n  private subscription: Subscription;\n\n  constructor() {\n    this.subscription = someObservable.subscribe();\n  }\n\n  ngOnDestroy() {\n    this.subscription.unsubscribe();\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong> &#8211; \u05e0\u05d9\u05e7\u05d9\u05d5\u05df \u05d9\u05e2\u05d9\u05dc \u05d9\u05d5\u05ea\u05e8 \u05e9\u05dc \u05de\u05e9\u05d0\u05d1\u05d9\u05dd \u05e2\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-DestroyRef<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ my.service.ts\nimport { Injectable, inject, DestroyRef } from &#039;@angular\/core&#039;;\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class MyService {\n  private destroyRef = inject(DestroyRef);\n  private subscription = someObservable.subscribe();\n\n  constructor() {\n    this.destroyRef.onDestroy(() =&gt; {\n      this.subscription.unsubscribe();\n    });\n  }\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Route-Based Code Splitting with canLoad Guards<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app-routing.module.ts\nconst routes: Routes = &#x5B;\n  {\n    path: &#039;admin&#039;,\n    loadChildren: () =&gt;\n      import(&#039;.\/admin\/admin.module&#039;).then((m) =&gt; m.AdminModule),\n    canLoad: &#x5B;AuthGuard],\n  },\n];\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong> &#8211; \u05de\u05e0\u05d2\u05e0\u05d5\u05df lazy loading \u05de\u05e9\u05d5\u05e4\u05e8.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app-routing.module.ts\nimport { inject } from &#039;@angular\/core&#039;;\n\nconst routes: Routes = &#x5B;\n  {\n    path: &#039;admin&#039;,\n    loadComponent: () =&gt;\n      import(&#039;.\/admin\/admin.component&#039;).then((m) =&gt; m.AdminComponent),\n    canMatch: &#x5B;\n      () =&gt; inject(AuthService).isLoggedIn(),\n    ],\n  },\n];\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Required Inputs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong> &#8211; \u05d0\u05d9\u05df \u05d3\u05e8\u05da \u05dc\u05d0\u05db\u05d5\u05e3 \u05d1\u05d6\u05de\u05df \u05db\u05ea\u05d9\u05d1\u05ea \u05d4\u05e7\u05d5\u05d3 \u05e9\u05dc\u05d9\u05d7\u05d4 \u05e9\u05dc \u05e2\u05e8\u05da \u05d1-@Input.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ my-component.component.ts\nimport { Component, Input } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;my-component&#039;,\n  template: `&lt;p&gt;{{ name }}&lt;\/p&gt;`,\n})\nexport class MyComponent {\n  @Input() name!: string;\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong> &#8211; \u05d0\u05e4\u05e9\u05e8 \u05dc\u05e1\u05de\u05df \u05e2\u05e8\u05da \u05e9\u05dc @Input \u05db-required \u05d5\u05dc\u05ea\u05e4\u05d5\u05e1 \u05e9\u05d2\u05d9\u05d0\u05d5\u05ea \u05db\u05d1\u05e8 \u05d1\u05d6\u05de\u05df \u05e7\u05d5\u05de\u05e4\u05d9\u05dc\u05e6\u05d9\u05d4.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ my-component.component.ts\nimport { Component, Input } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;my-component&#039;,\n  template: `&lt;p&gt;{{ name }}&lt;\/p&gt;`,\n})\nexport class MyComponent {\n  @Input({ required: true }) name!: string;\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Router Inputs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong> &#8211; \u05db\u05d3\u05d9 \u05dc\u05e7\u05d1\u05dc \u05e4\u05e8\u05de\u05d8\u05e8\u05d9\u05dd \u05e9\u05e2\u05d5\u05d1\u05e8\u05d9\u05dd \u05d1\u05db\u05ea\u05d5\u05d1\u05ea, \u05e6\u05e8\u05d9\u05da \u05dc\u05d7\u05dc\u05e5 \u05d0\u05d5\u05ea\u05dd \u05dc\u05ea\u05d5\u05da \u05de\u05e9\u05ea\u05e0\u05d4.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ article.component.ts\nimport { Component, OnInit } from &#039;@angular\/core&#039;;\nimport { ActivatedRoute } from &#039;@angular\/router&#039;;\n\n@Component({\n  selector: &#039;app-article&#039;,\n  template: `&lt;p&gt;Article ID: {{ articleId }}&lt;\/p&gt;`,\n})\nexport class ArticleComponent implements OnInit {\n  articleId?: string;\n\n  constructor(private route: ActivatedRoute) {}\n\n  ngOnInit() {\n    this.articleId = this.route.snapshot.paramMap.get(&#039;articleId&#039;) ?? undefined;\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong> &#8211; \u05d0\u05e4\u05e9\u05e8 \u05dc\u05e7\u05d1\u05dc \u05de\u05e9\u05ea\u05e0\u05d9\u05dd \u05e9\u05e2\u05d5\u05d1\u05e8\u05d9\u05dd \u05d1\u05db\u05ea\u05d5\u05d1\u05ea \u05d9\u05e9\u05d9\u05e8\u05d5\u05ea \u05dc\u05ea\u05d5\u05da \u05de\u05e9\u05ea\u05e0\u05d4 input.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app.module.ts\nimport { RouterModule, withComponentInputBinding } from &#039;@angular\/router&#039;;\n\n@NgModule({\n  imports: &#x5B;\n    RouterModule.forRoot(routes, {\n      bindToComponentInputs: true,\n    }),\n    \/\/ or\n    RouterModule.forRoot(routes, withComponentInputBinding()),\n  ],\n})\nexport class AppModule {}\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app-routing.module.ts\nconst routes: Routes = &#x5B;\n  {\n    path: &#039;articles\/:articleId&#039;,\n    component: ArticleComponent,\n  },\n];\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ article.component.ts\nimport { Component, Input } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-article&#039;,\n  template: `&lt;p&gt;Article ID: {{ articleId }}&lt;\/p&gt;`,\n})\nexport class ArticleComponent {\n  @Input() articleId?: string;\n}\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u05d4\u05e8\u05d7\u05d1\u05d4 &#8211; Standalone Components<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Standalone Components \u05d4\u05df \u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d5\u05ea \u05e9\u05dc\u05d0 \u05de\u05d5\u05d2\u05d3\u05e8\u05d5\u05ea \u05d1\u05de\u05d5\u05d3\u05d5\u05dc \u05d5\u05de\u05e1\u05d5\u05de\u05e0\u05d5\u05ea \u05d1-standalone: true. \u05d4\u05d4\u05d2\u05d3\u05e8\u05d4 \u05d4\u05d6\u05d0\u05ea \u05de\u05d0\u05e4\u05e9\u05e8\u05ea \u05dc\u05d4\u05df \u05dc\u05d4\u05d9\u05d5\u05ea \u05e2\u05e6\u05de\u05d0\u05d9\u05d5\u05ea \u05d5\u05de\u05e4\u05e9\u05d8\u05ea \u05d0\u05ea \u05de\u05d1\u05e0\u05d4 \u05d4\u05d0\u05e4\u05dc\u05d9\u05e7\u05e6\u05d9\u05d4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d4 \u05e9\u05d4\u05d9\u05d0 Standalone \u05e6\u05e8\u05d9\u05db\u05d4 \u05dc\u05d3\u05d0\u05d5\u05d2 \u05dc\u05d1\u05d3 \u05dc\u05d9\u05d9\u05d1\u05d5\u05d0 \u05e9\u05dc \u05db\u05dc \u05de\u05d4 \u05e9\u05d4\u05d9\u05d0 \u05de\u05e9\u05ea\u05de\u05e9\u05ea \u05d1\u05d5, \u05d0\u05d9\u05df \u05dc\u05d4 \u05e7\u05d5\u05d1\u05e5 \u05de\u05d5\u05d3\u05d5\u05dc \u05dc\u05e1\u05de\u05d5\u05da \u05e2\u05dc\u05d9\u05d5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>app.module.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { NgModule } from &#039;@angular\/core&#039;;\nimport { BrowserModule } from &#039;@angular\/platform-browser&#039;;\nimport { AppComponent } from &#039;.\/app.component&#039;;\nimport { HomeComponent } from &#039;.\/home\/home.component&#039;;\n\n@NgModule({\n  declarations: &#x5B;AppComponent, HomeComponent],\n  imports: &#x5B;BrowserModule],\n  providers: &#x5B;],\n  bootstrap: &#x5B;AppComponent],\n})\nexport class AppModule {}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>home.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-home&#039;,\n  template: `&lt;h1&gt;Welcome to the Home Component!&lt;\/h1&gt;`,\n})\nexport class HomeComponent {}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>home.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { CommonModule } from &#039;@angular\/common&#039;;\n\n@Component({\n  selector: &#039;app-home&#039;,\n  template: `&lt;h1&gt;Welcome to the Standalone Home Component!&lt;\/h1&gt;`,\n  standalone: true,\n  imports: &#x5B;CommonModule],\n})\nexport class HomeComponent {}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05db\u05d3\u05d9 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1-Standalone Component \u05d1\u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d5\u05ea \u05d0\u05d7\u05e8\u05d5\u05ea, \u05e6\u05e8\u05d9\u05da \u05dc\u05d9\u05d9\u05d1\u05d0 \u05d0\u05d5\u05ea\u05d4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>parent.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { MyStandaloneComponent } from &#039;.\/my-standalone.component&#039;;\n\n@Component({\n  selector: &#039;app-parent&#039;,\n  template: `\n    &lt;h1&gt;Parent Component&lt;\/h1&gt;\n    &lt;app-my-standalone&gt;&lt;\/app-my-standalone&gt;\n  `,\n  standalone: true,\n  imports: &#x5B;MyStandaloneComponent],\n})\nexport class ParentComponent {}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e4\u05e9\u05e8 \u05dc\u05d4\u05d2\u05d3\u05d9\u05e8 \u05dc\u05d0\u05e4\u05dc\u05d9\u05e7\u05e6\u05d9\u05d4 \u05de\u05d4 \u05ea\u05d4\u05d9\u05d4 \u05d4\u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d4 \u05d4\u05d4\u05ea\u05d7\u05dc\u05ea\u05d9\u05ea.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>main.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { bootstrapApplication } from &#039;@angular\/platform-browser&#039;;\nimport { AppComponent } from &#039;.\/app.component&#039;;\n\nbootstrapApplication(AppComponent);\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-Lazy Loading<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>app.routes.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Routes } from &#039;@angular\/router&#039;;\n\nexport const routes: Routes = &#x5B;\n  {\n    path: &#039;dashboard&#039;,\n    loadComponent: () =&gt;\n      import(&#039;.\/dashboard\/dashboard.component&#039;).then((m) =&gt; m.DashboardComponent),\n  },\n];\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d4\u05d6\u05e8\u05e7\u05ea services<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ component-with-provider.component.ts\nimport { Component } from &#039;@angular\/core&#039;;\nimport { MyService } from &#039;.\/my-service.service&#039;;\n\n@Component({\n  selector: &#039;app-component-with-provider&#039;,\n  template: `&lt;p&gt;Component with a service provider.&lt;\/p&gt;`,\n  standalone: true,\n  providers: &#x5B;MyService],\n})\nexport class ComponentWithProviderComponent {}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Standalone Directive<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ highlight.directive.ts\nimport { Directive, ElementRef, Renderer2, HostListener } from &#039;@angular\/core&#039;;\n\n@Directive({\n  selector: &#039;&#x5B;appHighlight]&#039;,\n  standalone: true,\n})\nexport class HighlightDirective {\n  constructor(private el: ElementRef, private renderer: Renderer2) {}\n\n  @HostListener(&#039;mouseenter&#039;) onMouseEnter() {\n    this.highlight(&#039;yellow&#039;);\n  }\n  @HostListener(&#039;mouseleave&#039;) onMouseLeave() {\n    this.highlight(null);\n  }\n  private highlight(color: string | null) {\n    this.renderer.setStyle(this.el.nativeElement, &#039;backgroundColor&#039;, color);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Standalone Pipe<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ truncate.pipe.ts\nimport { Pipe, PipeTransform } from &#039;@angular\/core&#039;;\n\n@Pipe({\n  name: &#039;truncate&#039;,\n  standalone: true,\n})\nexport class TruncatePipe implements PipeTransform {\n  transform(value: string, limit: number = 20): string {\n    return value.length &gt; limit ? value.substring(0, limit) + &#039;...&#039; : value;\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d0\u05d9\u05df \u05de\u05d5\u05d3\u05d5\u05dc\u05d9\u05dd \u05d1\u05ea\u05d5\u05db\u05e0\u05d9\u05ea, \u05d0\u05e8\u05d2\u05d5\u05df \u05d4\u05e7\u05d1\u05e6\u05d9\u05dd \u05dc\u05d0 \u05d9\u05d4\u05d9\u05d4 \u05dc\u05e4\u05d9 \u05de\u05d5\u05d3\u05d5\u05dc\u05d9\u05dd \u05d0\u05dc\u05d0 \u05dc\u05e4\u05d9 features.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsrc\/\n\u2514\u2500\u2500 app\/\n    \u251c\u2500\u2500 features\/\n    \u2502   \u251c\u2500\u2500 feature1\/\n    \u2502   \u2502   \u251c\u2500\u2500 feature1.component.ts\n    \u2502   \u2502   \u251c\u2500\u2500 feature1.component.html\n    \u2502   \u2502   \u251c\u2500\u2500 feature1.service.ts\n    \u2502   \u251c\u2500\u2500 feature2\/\n    \u2502       \u251c\u2500\u2500 feature2.component.ts\n    \u2502       \u251c\u2500\u2500 feature2.component.html\n    \u2502       \u251c\u2500\u2500 feature2.service.ts\n    \u251c\u2500\u2500 shared\/\n        \u251c\u2500\u2500 components\/\n        \u251c\u2500\u2500 directives\/\n        \u251c\u2500\u2500 pipes\/\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e9\u05dc\u05d1 \u05d1\u05ea\u05d5\u05db\u05e0\u05d9\u05ea \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05de\u05d5\u05d3\u05d5\u05dc\u05d9\u05dd \u05d5\u05d1-standalone components.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">New Built-in Control Flow Directives<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-directives \u05e9\u05de\u05d5\u05d1\u05e0\u05d9\u05dd \u05d1\u05ea\u05d5\u05da \u05d4\u05e7\u05d5\u05d3.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;!-- Using *ngIf --&gt;\n&lt;div *ngIf=&quot;condition&quot;&gt;\n  Content displayed if condition is true.\n&lt;\/div&gt;\n\n&lt;!-- Using *ngFor --&gt;\n&lt;ul&gt;\n  &lt;li *ngFor=&quot;let item of items; trackBy: trackByFn&quot;&gt;\n    {{ item }}\n  &lt;\/li&gt;\n&lt;\/ul&gt;\n\n&lt;!-- Using *ngSwitch --&gt;\n&lt;div &#x5B;ngSwitch]=&quot;value&quot;&gt;\n  &lt;div *ngSwitchCase=&quot;&#039;case1&#039;&quot;&gt;Case 1 content&lt;\/div&gt;\n  &lt;div *ngSwitchCase=&quot;&#039;case2&#039;&quot;&gt;Case 2 content&lt;\/div&gt;\n  &lt;div *ngSwitchDefault&gt;Default content&lt;\/div&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;!-- Using @if --&gt;\n@if(condition){\n  &lt;div&gt;\n    Content displayed if condition is true.\n  &lt;\/div&gt;\n}\n\n@if (a &gt; b) {\n  {{a}} is greater than {{b}}\n} @else if (b &gt; a) {\n  {{a}} is less than {{b}}\n} @else {\n  {{a}} is equal to {{b}}\n}\n\n&lt;!-- Using @for --&gt;\n&lt;ul&gt;\n  @for(item of items; track item.id; let i = $index){\n    &lt;li&gt;\n      {{ item }}\n    &lt;\/li&gt;\n  }\n&lt;\/ul&gt;\n\n@for (item of items; track item.name) {\n  &lt;li&gt; {{ item.name }}&lt;\/li&gt;\n} @empty {\n  &lt;li aria-hidden=&quot;true&quot;&gt; There are no items. &lt;\/li&gt;\n}\n\n&lt;!-- Using @switch --&gt;\n&lt;div&gt;\n  @switch(value){\n    @case(&#039;case1&#039;){\n      &lt;div&gt;Case 1 content&lt;\/div&gt;\n    }\n    @case(&#039;case2&#039;){\n      &lt;div&gt;Case 2 content&lt;\/div&gt;\n    }\n    @default{\n      &lt;div &gt;Default content&lt;\/div&gt;\n    }\n  }\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Enhanced Deferred Loading<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-lazy loading \u05de\u05e9\u05d5\u05e4\u05e8 \u05e9\u05dc \u05d9\u05d3\u05d9 \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-@defer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app-routing.module.ts\nconst routes: Routes = &#x5B;\n  {\n    path: &#039;feature&#039;,\n    loadChildren: () =&gt;\n      import(&#039;.\/feature\/feature.module&#039;).then((m) =&gt; m.FeatureModule),\n  },\n];\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;!-- Template --&gt;\n&lt;div @defer (onIdle)=&quot;loadComponent()&quot;&gt;\n  &lt;!-- Content to be loaded lazily --&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app-routing.module.ts\nconst routes: Routes = &#x5B;\n  {\n    path: &#039;feature&#039;,\n    loadComponent: () =&gt;\n      import(&#039;.\/feature\/feature.component&#039;).then((c) =&gt; c.FeatureComponent),\n    canActivate: &#x5B;&#039;defer&#039;],\n  },\n];\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Support for Custom Element Bindings and Providers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05d9\u05e0\u05d8\u05d2\u05e8\u05e6\u05d9\u05d4 \u05d8\u05d5\u05d1\u05d4 \u05d9\u05d5\u05ea\u05e8 \u05dc\u05d0\u05dc\u05de\u05e0\u05d8\u05d9\u05dd \u05de\u05d9\u05d5\u05e6\u05e8\u05d9\u05dd \u05d0\u05d9\u05e9\u05d9\u05ea.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ Defining a custom element\nimport { Component, NgModule, Injector } from &#039;@angular\/core&#039;;\nimport { createCustomElement } from &#039;@angular\/elements&#039;;\n\n@Component({\n  selector: &#039;my-element&#039;,\n  template: `&lt;p&gt;My Custom Element&lt;\/p&gt;`,\n})\nexport class MyElementComponent {}\n\n\/\/ Module declaration\n@NgModule({\n  declarations: &#x5B;MyElementComponent],\n  entryComponents: &#x5B;MyElementComponent],\n})\nexport class AppModule {\n  constructor(private injector: Injector) {\n    const el = createCustomElement(MyElementComponent, { injector });\n    customElements.define(&#039;my-element&#039;, el);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ Using standalone components\nimport { Component, inject } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;my-element&#039;,\n  template: `&lt;p&gt;My Custom Element&lt;\/p&gt;`,\n  standalone: true,\n})\nexport class MyElementComponent {}\n\n\/\/ Defining the custom element\nconst el = createCustomElement(MyElementComponent, {\n  injector: inject(Injector),\n});\ncustomElements.define(&#039;my-element&#039;, el);\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u05d4\u05e8\u05d7\u05d1\u05d4 &#8211; @defer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">@defer \u05d4\u05d5\u05d0 directive \u05e9\u05de\u05d0\u05e4\u05e9\u05e8 lazy loading \u05dc\u05d7\u05dc\u05e7\u05d9\u05dd \u05e9\u05dc \u05d4\u05ea\u05d1\u05e0\u05d9\u05ea. \u05db\u05dc\u05d5\u05de\u05e8 \u05dc\u05d0 \u05dc\u05d8\u05e2\u05d5\u05df \u05d7\u05dc\u05e7\u05d9\u05dd \u05de\u05e1\u05d5\u05d9\u05d9\u05de\u05d9\u05dd \u05e2\u05d3 \u05e9\u05ea\u05e0\u05d0\u05d9 \u05de\u05ea\u05e7\u05d9\u05d9\u05dd. \u05de\u05d4 \u05e9\u05de\u05d9\u05d9\u05e6\u05e8 \u05d8\u05e2\u05d9\u05e0\u05d4 \u05e8\u05d0\u05e9\u05d5\u05e0\u05d9\u05ea \u05de\u05d4\u05d9\u05e8\u05d4 \u05d9\u05d5\u05ea\u05e8 \u05e9\u05dc \u05d4\u05d3\u05e3.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Load Content When Browser is Idle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d4\u05ea\u05d5\u05db\u05df \u05d9\u05d8\u05e2\u05df \u05e8\u05e7 \u05db\u05e9\u05d4\u05d3\u05e4\u05d3\u05e4\u05df \u05e4\u05e0\u05d5\u05d9, \u05de\u05d4 \u05e9\u05de\u05d0\u05e4\u05e9\u05e8 \u05d8\u05e2\u05d9\u05e0\u05d4 \u05de\u05d4\u05d9\u05e8\u05d4 \u05e9\u05dc \u05d7\u05dc\u05e7\u05d9\u05dd \u05e9\u05dc \u05d4\u05d3\u05e3 \u05d5\u05d4\u05ea\u05d5\u05db\u05df \u05d4\u05db\u05d1\u05d3 \u05d9\u05d8\u05e2\u05df \u05e8\u05e7 \u05d0\u05d7\u05e8 \u05db\u05da.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div @defer (onIdle)&gt;\n  &lt;!-- Content to load when the browser is idle --&gt;\n  &lt;app-heavy-component&gt;&lt;\/app-heavy-component&gt;\n  &lt;ng-template #loading&gt;\n    &lt;p&gt;Loading component...&lt;\/p&gt;\n  &lt;\/ng-template&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Load Content When Element is Visible<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d8\u05e2\u05d9\u05e0\u05d4 \u05e9\u05dc \u05d7\u05dc\u05e7 \u05e8\u05e7 \u05db\u05d0\u05e9\u05e8 \u05d4\u05de\u05e9\u05ea\u05de\u05e9 \u05d2\u05dc\u05dc \u05d5\u05d4\u05d2\u05d9\u05e2 \u05dc\u05d7\u05dc\u05e7 \u05d4\u05d6\u05d4 \u05d1\u05d3\u05e3.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div @defer (onVisible)&gt;\n  &lt;!-- Content to load when visible in the viewport --&gt;\n  &lt;img src=&quot;large-image.jpg&quot; alt=&quot;Large Image&quot; \/&gt;\n  &lt;ng-template #loading&gt;\n    &lt;p&gt;Image is loading...&lt;\/p&gt;\n  &lt;\/ng-template&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Load Content After a Delay<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d8\u05e2\u05d9\u05e0\u05ea \u05ea\u05d5\u05db\u05df \u05e8\u05e7 \u05d0\u05d7\u05e8\u05d9 \u05d6\u05de\u05df \u05de\u05e1\u05d5\u05d9\u05d9\u05dd.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div @defer (onTimer)=&quot;3000&quot;&gt;\n  &lt;!-- Content to load after 3 seconds --&gt;\n  &lt;app-delayed-content&gt;&lt;\/app-delayed-content&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Load Content on User Interaction<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d8\u05e2\u05d9\u05e0\u05ea \u05ea\u05d5\u05db\u05df \u05e8\u05e7 \u05d0\u05d7\u05e8\u05d9 \u05e4\u05e2\u05d5\u05dc\u05d4 \u05e9\u05dc \u05d4\u05de\u05e9\u05ea\u05de\u05e9.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;button @defer (onInteraction)&gt;\n  Show Details\n  &lt;ng-template&gt;\n    &lt;!-- Deferred content --&gt;\n    &lt;app-details&gt;&lt;\/app-details&gt;\n  &lt;\/ng-template&gt;\n&lt;\/button&gt;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Best Practices<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1-@defer \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d2\u05e8\u05d5\u05dd \u05dc\u05ea\u05d5\u05db\u05df \u05d4\u05d7\u05e9\u05d5\u05d1 \u05e9\u05dc \u05d4\u05d3\u05e3 \u05dc\u05d4\u05d8\u05e2\u05df \u05e8\u05d0\u05e9\u05d5\u05df \u05d5\u05dc\u05e7\u05e6\u05e8 \u05d0\u05ea \u05d6\u05de\u05df \u05d4\u05d8\u05e2\u05d9\u05e0\u05d4 \u05d4\u05e8\u05d0\u05e9\u05d5\u05e0\u05d9.<\/li>\n\n\n\n<li>@defer \u05d0\u05de\u05e0\u05dd \u05de\u05e9\u05e4\u05e8 \u05d1\u05d9\u05e6\u05d5\u05e2\u05d9\u05dd, \u05d0\u05d1\u05dc \u05e9\u05d9\u05de\u05d5\u05e9 \u05d9\u05ea\u05e8 \u05d9\u05db\u05d5\u05dc \u05d3\u05d5\u05e7\u05d0 \u05dc\u05d4\u05d6\u05d9\u05e7 \u05dc\u05d4\u05dd.<\/li>\n\n\n\n<li>\u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1-loading \u05e2\u05dc \u05de\u05e0\u05ea \u05d4\u05d5\u05d3\u05d9\u05e2 \u05dc\u05de\u05e9\u05ea\u05de\u05e9 \u05de\u05d4 \u05e7\u05d5\u05e8\u05d4, \u05db\u05d3\u05d9 \u05e9\u05d9\u05d3\u05e2 \u05e9\u05d4\u05ea\u05d5\u05db\u05df \u05e0\u05d8\u05e2\u05df.<\/li>\n\n\n\n<li>\u05dc\u05d1\u05d3\u05d5\u05e7 \u05d1\u05d9\u05e6\u05d5\u05e2\u05d9\u05dd \u05e2\u05dd \u05d5\u05d1\u05dc\u05d9 @defer.<\/li>\n\n\n\n<li>@defer \u05d9\u05db\u05d5\u05dc \u05dc\u05d4\u05e9\u05e4\u05d9\u05e2 \u05e2\u05dc SEO \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05d7\u05dc\u05e7 \u05de\u05d4\u05ea\u05d5\u05db\u05df \u05dc\u05d0 \u05e0\u05d8\u05e2\u05df \u05d1\u05e4\u05e2\u05dd \u05d4\u05e8\u05d0\u05e9\u05d5\u05e0\u05d4.<\/li>\n\n\n\n<li>\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea &#8211; \u05dc\u05e8\u05d0\u05d5\u05ea \u05e9\u05d4\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-@defer \u05dc\u05d0 \u05e4\u05d5\u05d2\u05e2 \u05d1\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Route Redirects as Functions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app-routing.module.ts (Angular 15)\nconst routes: Routes = &#x5B;\n  { path: &#039;home&#039;, component: HomeComponent },\n  { path: &#039;dashboard&#039;, redirectTo: &#039;\/user\/dashboard&#039; },\n];\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ app.routes.ts (Angular 18)\nimport { Routes, Router } from &#039;@angular\/router&#039;;\nimport { inject } from &#039;@angular\/core&#039;;\n\nconst routes: Routes = &#x5B;\n  { path: &#039;home&#039;, component: HomeComponent },\n  {\n    path: &#039;dashboard&#039;,\n    redirectTo: (route) =&gt; {\n      const queryParams = route.queryParams;\n      const isAdmin = queryParams&#x5B;&#039;admin&#039;];\n      const router = inject(Router);\n\n      if (isAdmin === &#039;true&#039;) {\n        return &#039;\/admin\/dashboard&#039;;\n      } else if (isAdmin === &#039;false&#039;) {\n        return &#039;\/user\/dashboard&#039;;\n      } else {\n        \/\/ Handle error or redirect to not-found\n        return &#039;\/not-found&#039;;\n      }\n    },\n  },\n];\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Fallback Content for ng-content<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ custom-widget.component.ts (Angular 15)\nimport { Component } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-custom-widget&#039;,\n  template: `\n    &lt;ng-content select=&quot;.header&quot;&gt;&lt;\/ng-content&gt;\n    &lt;ng-content&gt;&lt;\/ng-content&gt;\n  `,\n})\nexport class CustomWidgetComponent {}\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;app-custom-widget&gt;\n  &lt;span class=&quot;header&quot;&gt;Custom Header&lt;\/span&gt;\n  &lt;p&gt;Custom Content&lt;\/p&gt;\n&lt;\/app-custom-widget&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ custom-widget.component.ts (Angular 18)\nimport { Component } from &#039;@angular\/core&#039;;\n\n@Component({\n  selector: &#039;app-custom-widget&#039;,\n  template: `\n    &lt;ng-content select=&quot;.header&quot;&gt;Default Header&lt;\/ng-content&gt;\n    &lt;ng-content&gt;Default Content&lt;\/ng-content&gt;\n  `,\n})\nexport class CustomWidgetComponent {}\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;!-- Using default content --&gt;\n&lt;app-custom-widget&gt;&lt;\/app-custom-widget&gt;\n\n&lt;!-- Overriding default header --&gt;\n&lt;app-custom-widget&gt;\n  &lt;span class=&quot;header&quot;&gt;New Header&lt;\/span&gt;\n&lt;\/app-custom-widget&gt;\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Form's New Control State Change Events<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ form.component.ts (Angular 15)\nimport { Component } from &#039;@angular\/core&#039;;\nimport { FormControl, Validators } from &#039;@angular\/forms&#039;;\n\n@Component({\n  selector: &#039;app-form&#039;,\n  template: `&lt;input &#x5B;formControl]=&quot;nameControl&quot; \/&gt;`,\n})\nexport class FormComponent {\n  nameControl = new FormControl(&#039;&#039;, Validators.required);\n\n  constructor() {\n    this.nameControl.valueChanges.subscribe((value) =&gt; {\n      console.log(&#039;Value changed:&#039;, value);\n    });\n\n    this.nameControl.statusChanges.subscribe((status) =&gt; {\n      console.log(&#039;Status changed:&#039;, status);\n    });\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ form.component.ts (Angular 18)\nimport { Component } from &#039;@angular\/core&#039;;\nimport { FormControl, Validators } from &#039;@angular\/forms&#039;;\n\n@Component({\n  selector: &#039;app-form&#039;,\n  template: `&lt;input &#x5B;formControl]=&quot;nameControl&quot; \/&gt;`,\n})\nexport class FormComponent {\n  nameControl = new FormControl(&#039;&#039;, Validators.required);\n\n  constructor() {\n    this.nameControl.events.subscribe((event) =&gt; {\n      if (event.type === &#039;valueChange&#039;) {\n        console.log(&#039;Value changed:&#039;, event.value);\n      } else if (event.type === &#039;statusChange&#039;) {\n        console.log(&#039;Status changed:&#039;, event.status);\n      }\n    });\n  }\n}\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u05d4\u05e8\u05d7\u05d1\u05d4 &#8211; signals<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">signals \u05d4\u05d5\u05d0 \u05e1\u05d5\u05d2 \u05de\u05e9\u05ea\u05e0\u05d4 \u05e9\u05de\u05d0\u05e4\u05e9\u05e8 \u05e8\u05d9\u05d0\u05e7\u05d8\u05d9\u05d1\u05d9\u05d5\u05ea, \u05db\u05dc\u05d5\u05de\u05e8 \u05db\u05e9\u05d4\u05e2\u05e8\u05da \u05e9\u05dc \u05d4\u05de\u05e9\u05ea\u05e0\u05d4 \u05de\u05e9\u05ea\u05e0\u05d4, \u05ea\u05d4\u05d9\u05d4 \u05d4\u05e9\u05e4\u05e2\u05d4 \u05e2\u05dc \u05db\u05dc \u05de\u05d9 \u05e9\u05ea\u05dc\u05d5\u05d9 \u05d1\u05de\u05e9\u05ea\u05e0\u05d4 \u05d4\u05d6\u05d4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea \u05dc\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-signals.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Fetching Data from an API and Displaying It in a Component<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong> &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-rxjs \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05de-API.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>data.service.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable } from &#039;@angular\/core&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport { Observable } from &#039;rxjs&#039;;\n\nexport interface Item {\n  id: number;\n  name: string;\n}\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class DataService {\n  private apiUrl = &#039;https:\/\/api.example.com\/items&#039;;\n\n  constructor(private http: HttpClient) {}\n\n  getItems(): Observable&lt;Item&#x5B;]&gt; {\n    return this.http.get&lt;Item&#x5B;]&gt;(this.apiUrl);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>item-list.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component, OnInit } from &#039;@angular\/core&#039;;\nimport { DataService, Item } from &#039;..\/data.service&#039;;\n\n@Component({\n  selector: &#039;app-item-list&#039;,\n  template: `\n    &lt;h2&gt;Items&lt;\/h2&gt;\n    &lt;ul *ngIf=&quot;items&quot;&gt;\n      &lt;li *ngFor=&quot;let item of items&quot;&gt;{{ item.name }}&lt;\/li&gt;\n    &lt;\/ul&gt;\n  `,\n})\nexport class ItemListComponent implements OnInit {\n  items: Item&#x5B;] = &#x5B;];\n\n  constructor(private dataService: DataService) {}\n\n  ngOnInit() {\n    this.dataService.getItems().subscribe((data) =&gt; (this.items = data));\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong> &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-signals.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>data.service.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable, signal } from &#039;@angular\/core&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\n\nexport interface Item {\n  id: number;\n  name: string;\n}\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class DataService {\n  private apiUrl = &#039;https:\/\/api.example.com\/items&#039;;\n  items = signal&lt;Item&#x5B;]&gt;(&#x5B;]);\n\n  constructor(private http: HttpClient) {\n    this.fetchItems();\n  }\n\n  fetchItems() {\n    this.http.get&lt;Item&#x5B;]&gt;(this.apiUrl).subscribe((data) =&gt; this.items.set(data));\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">item-list.component.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { DataService } from &#039;..\/data.service&#039;;\n\n@Component({\n  selector: &#039;app-item-list&#039;,\n  template: `\n    &lt;h2&gt;Items&lt;\/h2&gt;\n    &lt;ul&gt;\n      &lt;li *ngFor=&quot;let item of items()&quot;&gt;{{ item.name }}&lt;\/li&gt;\n    &lt;\/ul&gt;\n  `,\n})\nexport class ItemListComponent {\n  items = this.dataService.items;\n\n  constructor(private dataService: DataService) {}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong><span style=\"text-decoration: underline;\">\u05d3\u05d5\u05d2\u05de\u05d0 \u05e0\u05d5\u05e1\u05e4\u05ea &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d9\u05ea post.<\/span><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">data.service.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable } from &#039;@angular\/core&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport { Observable } from &#039;rxjs&#039;;\n\nexport interface ItemDetails {\n  id: number;\n  name: string;\n  description: string;\n  \/\/ Other properties...\n}\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class DataService {\n  private apiUrl = &#039;https:\/\/api.example.com\/item-details&#039;;\n\n  constructor(private http: HttpClient) {}\n\n  getItemDetails(id: number): Observable&lt;ItemDetails&gt; {\n    const body = { id: id };\n    return this.http.post&lt;ItemDetails&gt;(this.apiUrl, body);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">item-detail.component.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component, OnInit } from &#039;@angular\/core&#039;;\nimport { DataService, ItemDetails } from &#039;..\/data.service&#039;;\n\n@Component({\n  selector: &#039;app-item-detail&#039;,\n  template: `\n    &lt;h2&gt;Item Details&lt;\/h2&gt;\n    &lt;div *ngIf=&quot;itemDetails&quot;&gt;\n      &lt;p&gt;&lt;strong&gt;ID:&lt;\/strong&gt; {{ itemDetails.id }}&lt;\/p&gt;\n      &lt;p&gt;&lt;strong&gt;Name:&lt;\/strong&gt; {{ itemDetails.name }}&lt;\/p&gt;\n      &lt;p&gt;&lt;strong&gt;Description:&lt;\/strong&gt; {{ itemDetails.description }}&lt;\/p&gt;\n      &lt;!-- Display other properties as needed --&gt;\n    &lt;\/div&gt;\n  `,\n})\nexport class ItemDetailComponent implements OnInit {\n  itemDetails?: ItemDetails;\n  itemId = 1; \/\/ Example id; in a real app, this might come from route parameters or user input.\n\n  constructor(private dataService: DataService) {}\n\n  ngOnInit() {\n    this.dataService.getItemDetails(this.itemId).subscribe(\n      (data) =&gt; {\n        this.itemDetails = data;\n      },\n      (error) =&gt; {\n        console.error(&#039;Error fetching item details:&#039;, error);\n      }\n    );\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">data.service.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable } from &#039;@angular\/core&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport { ItemDetails } from &#039;.\/item-details.model&#039;;\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class DataService {\n  private apiUrl = &#039;https:\/\/api.example.com\/item-details&#039;;\n\n  constructor(private http: HttpClient) {}\n\n  getItemDetails(id: number) {\n    const body = { id: id };\n    return this.http.post&lt;ItemDetails&gt;(this.apiUrl, body);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">item-detail.component.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component, signal, effect } from &#039;@angular\/core&#039;;\nimport { DataService } from &#039;..\/data.service&#039;;\nimport { ItemDetails } from &#039;..\/item-details.model&#039;;\nimport { toSignal } from &#039;@angular\/core\/rxjs-interop&#039;;\n\n@Component({\n  selector: &#039;app-item-detail&#039;,\n  template: `\n    &lt;h2&gt;Item Details&lt;\/h2&gt;\n    &lt;div *ngIf=&quot;itemDetails()&quot;&gt;\n      &lt;p&gt;&lt;strong&gt;ID:&lt;\/strong&gt; {{ itemDetails().id }}&lt;\/p&gt;\n      &lt;p&gt;&lt;strong&gt;Name:&lt;\/strong&gt; {{ itemDetails().name }}&lt;\/p&gt;\n      &lt;p&gt;&lt;strong&gt;Description:&lt;\/strong&gt; {{ itemDetails().description }}&lt;\/p&gt;\n    &lt;\/div&gt;\n  `,\n})\nexport class ItemDetailComponent {\n  itemId = signal&lt;number&gt;(1); \/\/ Signal holding the ID\n  itemDetails = signal&lt;ItemDetails | null&gt;(null); \/\/ Signal for item details\n\n  constructor(private dataService: DataService) {\n    effect(() =&gt; {\n      const id = this.itemId();\n      if (id) {\n        \/\/ Fetch data when itemId changes\n        const itemDetails$ = this.dataService.getItemDetails(id);\n        const itemDetailsSignal = toSignal(itemDetails$, { initialValue: null });\n        this.itemDetails.set(itemDetailsSignal());\n      }\n    });\n  }\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Reactive Form Validation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">form.component.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component, OnInit } from &#039;@angular\/core&#039;;\nimport { FormBuilder, FormGroup, Validators } from &#039;@angular\/forms&#039;;\nimport { debounceTime } from &#039;rxjs\/operators&#039;;\n\n@Component({\n  selector: &#039;app-form&#039;,\n  template: `\n    &lt;form &#x5B;formGroup]=&quot;myForm&quot;&gt;\n      &lt;input formControlName=&quot;name&quot; placeholder=&quot;Enter your name&quot; \/&gt;\n      &lt;div *ngIf=&quot;nameError&quot;&gt;{{ nameError }}&lt;\/div&gt;\n    &lt;\/form&gt;\n  `,\n})\nexport class FormComponent implements OnInit {\n  myForm: FormGroup;\n  nameError: string = &#039;&#039;;\n\n  constructor(private fb: FormBuilder) {\n    this.myForm = this.fb.group({\n      name: &#x5B;&#039;&#039;, Validators.required],\n    });\n  }\n\n  ngOnInit() {\n    this.myForm\n      .get(&#039;name&#039;)\n      ?.valueChanges.pipe(debounceTime(300))\n      .subscribe((value) =&gt; {\n        if (value.length &lt; 3) {\n          this.nameError = &#039;Name must be at least 3 characters&#039;;\n        } else {\n          this.nameError = &#039;&#039;;\n        }\n      });\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">form.component.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component, signal, effect } from &#039;@angular\/core&#039;;\nimport { FormControl } from &#039;@angular\/forms&#039;;\n\n@Component({\n  selector: &#039;app-form&#039;,\n  template: `\n    &lt;form&gt;\n      &lt;input &#x5B;formControl]=&quot;nameControl&quot; placeholder=&quot;Enter your name&quot; \/&gt;\n      &lt;div *ngIf=&quot;nameError()&quot;&gt;{{ nameError() }}&lt;\/div&gt;\n    &lt;\/form&gt;\n  `,\n})\nexport class FormComponent {\n  nameControl = new FormControl(&#039;&#039;);\n  nameError = signal&lt;string&gt;(&#039;&#039;);\n\n  constructor() {\n    effect(() =&gt; {\n      const value = this.nameControl.value;\n      if (value.length &lt; 3) {\n        this.nameError.set(&#039;Name must be at least 3 characters&#039;);\n      } else {\n        this.nameError.set(&#039;&#039;);\n      }\n    });\n  }\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Shared State Across Components<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e9\u05d9\u05ea\u05d5\u05e3 \u05de\u05d9\u05d3\u05e2 \u05d1\u05d9\u05df \u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d5\u05ea.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15<\/strong> &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-RxJS BehaviorSubject<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">counter.service.ts<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable } from &#039;@angular\/core&#039;;\nimport { BehaviorSubject } from &#039;rxjs&#039;;\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class CounterService {\n  private _counter = new BehaviorSubject&lt;number&gt;(0);\n  counter$ = this._counter.asObservable();\n\n  increment() {\n    this._counter.next(this._counter.value + 1);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Component A: <strong>counter-display.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component, OnInit } from &#039;@angular\/core&#039;;\nimport { CounterService } from &#039;..\/counter.service&#039;;\n\n@Component({\n  selector: &#039;app-counter-display&#039;,\n  template: `&lt;p&gt;Counter: {{ counter }}&lt;\/p&gt;`,\n})\nexport class CounterDisplayComponent implements OnInit {\n  counter: number = 0;\n\n  constructor(private counterService: CounterService) {}\n\n  ngOnInit() {\n    this.counterService.counter$.subscribe((value) =&gt; (this.counter = value));\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Component B: <strong>counter-button.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { CounterService } from &#039;..\/counter.service&#039;;\n\n@Component({\n  selector: &#039;app-counter-button&#039;,\n  template: `&lt;button (click)=&quot;increment()&quot;&gt;Increment&lt;\/button&gt;`,\n})\nexport class CounterButtonComponent {\n  constructor(private counterService: CounterService) {}\n\n  increment() {\n    this.counterService.increment();\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 17<\/strong> &#8211; \u05e9\u05d9\u05de\u05d5\u05e9 \u05d1-Signals<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>counter.service.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable, signal } from &#039;@angular\/core&#039;;\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class CounterService {\n  counter = signal&lt;number&gt;(0);\n\n  increment() {\n    this.counter.update((value) =&gt; value + 1);\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Component A: <strong>counter-display.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { CounterService } from &#039;..\/counter.service&#039;;\n\n@Component({\n  selector: &#039;app-counter-display&#039;,\n  template: `&lt;p&gt;Counter: {{ counter() }}&lt;\/p&gt;`,\n})\nexport class CounterDisplayComponent {\n  counter = this.counterService.counter;\n\n  constructor(private counterService: CounterService) {}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Component B: <strong>counter-button.component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { CounterService } from &#039;..\/counter.service&#039;;\n\n@Component({\n  selector: &#039;app-counter-button&#039;,\n  template: `&lt;button (click)=&quot;increment()&quot;&gt;Increment&lt;\/button&gt;`,\n})\nexport class CounterButtonComponent {\n  constructor(private counterService: CounterService) {}\n\n  increment() {\n    this.counterService.increment();\n  }\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u05de\u05e7\u05e8\u05d9\u05dd \u05e9\u05d1\u05d4\u05dd \u05e2\u05d3\u05d9\u05e3 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1-RxJS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05e8\u05d5\u05d1\u05d4 \u05dc\u05de\u05d9\u05d3\u05e2 \u05d0-\u05e1\u05d9\u05e0\u05db\u05e8\u05d5\u05e0\u05d9 \u05d0\u05d5 \u05e6\u05d5\u05e8\u05da \u05d1\u05d8\u05e8\u05e0\u05e1\u05e4\u05d5\u05e8\u05de\u05e6\u05d9\u05d4 \u05de\u05d5\u05e8\u05db\u05d1\u05ea \u05dc\u05de\u05d9\u05d3\u05e2 \u05e9\u05de\u05ea\u05e7\u05d1\u05dc \u05de\u05d4-API.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ data.service.ts (Angular 17)\nimport { Injectable } from &#039;@angular\/core&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport { Observable, forkJoin } from &#039;rxjs&#039;;\nimport { map } from &#039;rxjs\/operators&#039;;\n\nexport interface User {\n  id: number;\n  name: string;\n}\n\nexport interface Orders {\n  userId: number;\n  orders: Order&#x5B;];\n}\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class DataService {\n  constructor(private http: HttpClient) {}\n\n  getUserWithOrders(userId: number): Observable&lt;{ user: User; orders: Orders }&gt; {\n    return forkJoin({\n      user: this.http.get&lt;User&gt;(`\/api\/users\/${userId}`),\n      orders: this.http.get&lt;Orders&gt;(`\/api\/orders?userId=${userId}`),\n    });\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05e6\u05d5\u05e8\u05da \u05d1\u05e2\u05d9\u05d1\u05d5\u05d3 \u05de\u05d4\u05d9\u05e8 \u05e9\u05dc \u05de\u05d9\u05d3\u05e2 \u05e9\u05de\u05d2\u05d9\u05e2 \u05de\u05d4\u05e7\u05dc\u05d8 \u05db\u05de\u05d5 \u05dc\u05de\u05e9\u05dc \u05d1\u05d7\u05d9\u05e4\u05d5\u05e9 \u05e2\u05dc \u05e4\u05d9 \u05e7\u05dc\u05d8 \u05d4\u05de\u05e9\u05ea\u05de\u05e9 \u05d5\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05d4\u05e9\u05d4\u05d9\u05d9\u05d4 \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d0\u05de\u05ea \u05e7\u05dc\u05d8.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { FormControl } from &#039;@angular\/forms&#039;;\nimport { Observable } from &#039;rxjs&#039;;\nimport { debounceTime, distinctUntilChanged, switchMap } from &#039;rxjs\/operators&#039;;\nimport { SearchService } from &#039;..\/search.service&#039;;\n\n@Component({\n  selector: &#039;app-search&#039;,\n  template: `\n    &lt;input type=&quot;text&quot; &#x5B;formControl]=&quot;searchControl&quot; placeholder=&quot;Search...&quot; \/&gt;\n    &lt;ul&gt;\n      &lt;li *ngFor=&quot;let item of results$ | async&quot;&gt;{{ item.name }}&lt;\/li&gt;\n    &lt;\/ul&gt;\n  `,\n})\nexport class SearchComponent {\n  searchControl = new FormControl(&#039;&#039;);\n  results$: Observable&lt;SearchResult&#x5B;]&gt;;\n\n  constructor(private searchService: SearchService) {\n    this.results$ = this.searchControl.valueChanges.pipe(\n      debounceTime(300),\n      distinctUntilChanged(),\n      switchMap((term) =&gt; this.searchService.search(term))\n    );\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05ea\u05e4\u05d9\u05e1\u05ea \u05e9\u05d2\u05d9\u05d0\u05d5\u05ea \u05de\u05d5\u05e8\u05db\u05d1\u05ea \u05d5\u05d4\u05e4\u05e2\u05dc\u05d4 \u05e9\u05dc \u05dc\u05d5\u05d2\u05d9\u05e7\u05d4 \u05d1\u05ea\u05d5\u05da \u05ea\u05e4\u05d9\u05e1\u05ea \u05d4\u05e9\u05d2\u05d9\u05d0\u05d5\u05ea.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Injectable } from &#039;@angular\/core&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport { Observable, throwError, timer } from &#039;rxjs&#039;;\nimport { retryWhen, mergeMap } from &#039;rxjs\/operators&#039;;\n\n@Injectable({\n  providedIn: &#039;root&#039;,\n})\nexport class DataService {\n  constructor(private http: HttpClient) {}\n\n  getData(): Observable&lt;Data&gt; {\n    return this.http.get&lt;Data&gt;(&#039;\/api\/data&#039;).pipe(\n      retryWhen((errors) =&gt;\n        errors.pipe(\n          mergeMap((error, i) =&gt; {\n            if (i &gt;= 3) {\n              return throwError(error);\n            }\n            return timer(1000 * (i + 1));\n          })\n        )\n      )\n    );\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05de\u05d5\u05e8\u05db\u05d1\u05ea \u05d1\u05ea\u05e4\u05d9\u05e1\u05ea events. \u05d1\u05d3\u05d5\u05d2\u05de\u05d0 \u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d5\u05e0\u05dc\u05d9\u05d5\u05ea \u05e9\u05dc drop-down.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Directive, ElementRef, OnInit } from &#039;@angular\/core&#039;;\nimport { fromEvent } from &#039;rxjs&#039;;\nimport { switchMap, takeUntil, pairwise } from &#039;rxjs\/operators&#039;;\n\n@Directive({\n  selector: &#039;&#x5B;appDraggable]&#039;,\n})\nexport class DraggableDirective implements OnInit {\n  constructor(private element: ElementRef) {}\n\n  ngOnInit() {\n    const mouseDown$ = fromEvent&lt;MouseEvent&gt;(this.element.nativeElement, &#039;mousedown&#039;);\n    const mouseMove$ = fromEvent&lt;MouseEvent&gt;(document, &#039;mousemove&#039;);\n    const mouseUp$ = fromEvent&lt;MouseEvent&gt;(document, &#039;mouseup&#039;);\n\n    mouseDown$\n      .pipe(\n        switchMap(() =&gt;\n          mouseMove$.pipe(\n            takeUntil(mouseUp$),\n            pairwise()\n          )\n        )\n      )\n      .subscribe((&#x5B;prev, curr]) =&gt; {\n        const deltaX = curr.clientX - prev.clientX;\n        const deltaY = curr.clientY - prev.clientY;\n        \/\/ Update element position\n        const element = this.element.nativeElement;\n        element.style.left = element.offsetLeft + deltaX + &#039;px&#039;;\n        element.style.top = element.offsetTop + deltaY + &#039;px&#039;;\n      });\n  }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05d0\u05d5\u05e4\u05e8\u05d8\u05d5\u05e8\u05d9\u05dd \u05de\u05d5\u05e8\u05db\u05d1\u05d9\u05dd.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Observable, timer, throwError } from &#039;rxjs&#039;;\nimport { mergeMap } from &#039;rxjs\/operators&#039;;\n\nexport function retryWithDelay(retryCount: number, delayMs: number) {\n  return (src: Observable&lt;any&gt;) =&gt;\n    src.pipe(\n      retryWhen((errors) =&gt;\n        errors.pipe(\n          mergeMap((error, i) =&gt; {\n            if (i &gt;= retryCount) {\n              return throwError(error);\n            }\n            return timer(delayMs);\n          })\n        )\n      )\n    );\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d4\u05de\u05e8\u05d4 \u05d1\u05d9\u05df Observables \u05dc-Signals.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nimport { Component } from &#039;@angular\/core&#039;;\nimport { interval } from &#039;rxjs&#039;;\nimport { toSignal } from &#039;@angular\/core\/rxjs-interop&#039;;\n\n@Component({\n  selector: &#039;app-timer&#039;,\n  template: `&lt;p&gt;Seconds elapsed: {{ secondsElapsed() }}&lt;\/p&gt;`,\n})\nexport class TimerComponent {\n  secondsElapsed = toSignal(interval(1000));\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u05db\u05d9\u05d5\u05dd (22.10.24) \u05d4\u05d2\u05e8\u05e1\u05d4 \u05d4\u05e2\u05d3\u05db\u05e0\u05d9\u05ea \u05e9\u05dc \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 \u05d4\u05d9\u05d0 18. \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5 \u05db\u05ea\u05d1\u05ea\u05d9 \u05d1\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15, \u05d0\u05db\u05ea\u05d5\u05d1 \u05e2\u05dc \u05d4\u05de\u05e2\u05d1\u05e8 \u05d5\u05de\u05d4 \u05e9\u05d5\u05e0\u05d4 \u05d1\u05d2\u05e8\u05e1\u05d0\u05d5\u05ea \u05e9\u05e2\u05d1\u05e8\u05d5 \u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5. \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16 Standalone Components by Default \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 &#8211; standalone components \u05d4\u05d9\u05d5 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd, \u05d0\u05d1\u05dc \u05dc\u05d0 \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. \u05e2\u05d3\u05d9\u05d9\u05df \u05d4\u05d9\u05d4 \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05de\u05d5\u05d3\u05d5\u05dc \u05d0\u05d7\u05d3 \u05dc\u05e4\u05d7\u05d5\u05ea. \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16 &#8211; standalone components \u05e0\u05d5\u05e6\u05e8\u05d9\u05dd \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[29],"tags":[],"class_list":["post-1908","post","type-post","status-publish","format-standard","hentry","category-angular-docs","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18 - Code Notebook<\/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:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/\" \/>\n<meta property=\"og:locale\" content=\"he_IL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18 - Code Notebook\" \/>\n<meta property=\"og:description\" content=\"\u05db\u05d9\u05d5\u05dd (22.10.24) \u05d4\u05d2\u05e8\u05e1\u05d4 \u05d4\u05e2\u05d3\u05db\u05e0\u05d9\u05ea \u05e9\u05dc \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 \u05d4\u05d9\u05d0 18. \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5 \u05db\u05ea\u05d1\u05ea\u05d9 \u05d1\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15, \u05d0\u05db\u05ea\u05d5\u05d1 \u05e2\u05dc \u05d4\u05de\u05e2\u05d1\u05e8 \u05d5\u05de\u05d4 \u05e9\u05d5\u05e0\u05d4 \u05d1\u05d2\u05e8\u05e1\u05d0\u05d5\u05ea \u05e9\u05e2\u05d1\u05e8\u05d5 \u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5. \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16 Standalone Components by Default \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 &#8211; standalone components \u05d4\u05d9\u05d5 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd, \u05d0\u05d1\u05dc \u05dc\u05d0 \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. \u05e2\u05d3\u05d9\u05d9\u05df \u05d4\u05d9\u05d4 \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05de\u05d5\u05d3\u05d5\u05dc \u05d0\u05d7\u05d3 \u05dc\u05e4\u05d7\u05d5\u05ea. \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16 &#8211; standalone components \u05e0\u05d5\u05e6\u05e8\u05d9\u05dd \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/\" \/>\n<meta property=\"og:site_name\" content=\"Code Notebook\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-22T19:21:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-24T12:12:50+00:00\" \/>\n<meta name=\"author\" content=\"kerendanino\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3\" \/>\n\t<meta name=\"twitter:data1\" content=\"kerendanino\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u05d3\u05e7\u05d5\u05ea\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/\"},\"author\":{\"name\":\"kerendanino\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/person\\\/195dfc625818eadda7903d456890e24c\"},\"headline\":\"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18\",\"datePublished\":\"2024-10-22T19:21:46+00:00\",\"dateModified\":\"2024-12-24T12:12:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/\"},\"wordCount\":258,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\"},\"articleSection\":[\"Angular Documentation\"],\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/\",\"name\":\"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18 - Code Notebook\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#website\"},\"datePublished\":\"2024-10-22T19:21:46+00:00\",\"dateModified\":\"2024-12-24T12:12:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/#breadcrumb\"},\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/whats-new-in-angular-16-17-18\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#website\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\",\"name\":\"Code Notebook\",\"description\":\"Easy coding\",\"publisher\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"he-IL\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\",\"name\":\"Code Notebook\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo-epic-marketing-05.png\",\"contentUrl\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo-epic-marketing-05.png\",\"width\":3626,\"height\":1942,\"caption\":\"Code Notebook\"},\"image\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/person\\\/195dfc625818eadda7903d456890e24c\",\"name\":\"kerendanino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"caption\":\"kerendanino\"},\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/author\\\/kerendanino\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18 - Code Notebook","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:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/","og_locale":"he_IL","og_type":"article","og_title":"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18 - Code Notebook","og_description":"\u05db\u05d9\u05d5\u05dd (22.10.24) \u05d4\u05d2\u05e8\u05e1\u05d4 \u05d4\u05e2\u05d3\u05db\u05e0\u05d9\u05ea \u05e9\u05dc \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 \u05d4\u05d9\u05d0 18. \u05de\u05db\u05d9\u05d5\u05d5\u05df \u05e9\u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5 \u05db\u05ea\u05d1\u05ea\u05d9 \u05d1\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15, \u05d0\u05db\u05ea\u05d5\u05d1 \u05e2\u05dc \u05d4\u05de\u05e2\u05d1\u05e8 \u05d5\u05de\u05d4 \u05e9\u05d5\u05e0\u05d4 \u05d1\u05d2\u05e8\u05e1\u05d0\u05d5\u05ea \u05e9\u05e2\u05d1\u05e8\u05d5 \u05e2\u05d3 \u05e2\u05db\u05e9\u05d9\u05d5. \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16 Standalone Components by Default \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 &#8211; standalone components \u05d4\u05d9\u05d5 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd, \u05d0\u05d1\u05dc \u05dc\u05d0 \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. \u05e2\u05d3\u05d9\u05d9\u05df \u05d4\u05d9\u05d4 \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05de\u05d5\u05d3\u05d5\u05dc \u05d0\u05d7\u05d3 \u05dc\u05e4\u05d7\u05d5\u05ea. \u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 16 &#8211; standalone components \u05e0\u05d5\u05e6\u05e8\u05d9\u05dd \u05db\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc. [&hellip;]","og_url":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/","og_site_name":"Code Notebook","article_published_time":"2024-10-22T19:21:46+00:00","article_modified_time":"2024-12-24T12:12:50+00:00","author":"kerendanino","twitter_card":"summary_large_image","twitter_misc":{"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3":"kerendanino","\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da":"4 \u05d3\u05e7\u05d5\u05ea"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/#article","isPartOf":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/"},"author":{"name":"kerendanino","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/person\/195dfc625818eadda7903d456890e24c"},"headline":"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18","datePublished":"2024-10-22T19:21:46+00:00","dateModified":"2024-12-24T12:12:50+00:00","mainEntityOfPage":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/"},"wordCount":258,"commentCount":0,"publisher":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization"},"articleSection":["Angular Documentation"],"inLanguage":"he-IL","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/","url":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/","name":"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18 - Code Notebook","isPartOf":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#website"},"datePublished":"2024-10-22T19:21:46+00:00","dateModified":"2024-12-24T12:12:50+00:00","breadcrumb":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/#breadcrumb"},"inLanguage":"he-IL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/epicmarketing.co.il\/notebook\/whats-new-in-angular-16-17-18\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/epicmarketing.co.il\/notebook\/"},{"@type":"ListItem","position":2,"name":"\u05de\u05e2\u05d1\u05e8 \u05de\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 15 \u05dc\u05d0\u05e0\u05d2\u05d5\u05dc\u05e8 18"}]},{"@type":"WebSite","@id":"https:\/\/epicmarketing.co.il\/notebook\/#website","url":"https:\/\/epicmarketing.co.il\/notebook\/","name":"Code Notebook","description":"Easy coding","publisher":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/epicmarketing.co.il\/notebook\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"he-IL"},{"@type":"Organization","@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization","name":"Code Notebook","url":"https:\/\/epicmarketing.co.il\/notebook\/","logo":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/logo\/image\/","url":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/07\/logo-epic-marketing-05.png","contentUrl":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/07\/logo-epic-marketing-05.png","width":3626,"height":1942,"caption":"Code Notebook"},"image":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/person\/195dfc625818eadda7903d456890e24c","name":"kerendanino","image":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","caption":"kerendanino"},"url":"https:\/\/epicmarketing.co.il\/notebook\/author\/kerendanino\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/comments?post=1908"}],"version-history":[{"count":12,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1908\/revisions"}],"predecessor-version":[{"id":2125,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1908\/revisions\/2125"}],"wp:attachment":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/media?parent=1908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/categories?post=1908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/tags?post=1908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}