8000 docs(effects): remove redundant standalone flag (#4626) · ngrx/platform@c24cb33 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
docs(effects): remove redundant standalone flag (#4626)
Browse files Browse the repository at this point in the history
  • Loading branch information
markostanimirovic authored Dec 10, 2024
1 parent 3850a98 commit c24cb33
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions projects/ngrx.io/content/guide/effects/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In a service-based application, your components interact with data through many
Imagine that your application manages movies. Here is a component that fetches and displays a list of movies.

<code-example header="movies-page.component.ts">
import { Component, inject } from '@angular/core';
import { Component, inject, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
Expand All @@ -33,12 +33,11 @@ import { CommonModule } from '@angular/common';
{{ movie.name }}
&lt;/li&gt;
`,
standalone: true,
imports: [CommonModule],
})
export class MoviesPageComponent {
export class MoviesPageComponent implements OnInit {
private moviesService = inject(MoviesService);
protected movies: Movie[];
protected movies: Movie[] = [];

ngOnInit() {
this.movieService.getAll()
Expand Down Expand Up @@ -77,7 +76,7 @@ The component has multiple responsibilities:
Effects handle external data and interactions, allowing your services to be less stateful and only perform tasks related to external interactions. Next, refactor the component to put the shared movie data in the `Store`. Effects handle the fetching of movie data.

<code-example header="movies-page.component.ts">
import { Component, inject } from '@angular/core';
import { Component, inject, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
Expand All @@ -86,7 +85,6 @@ import { CommonModule } from '@angular/common';
{{ movie.name }}
&lt;/div&gt;
`,
standalone: true,
imports: [CommonModule],
})
export class MoviesPageComponent implements OnInit {
Expand Down

0 comments on commit c24cb33

Please sign in to comment.
0