How to use the @nrwl/angular.navigation function in @nrwl/angular

To help you get started, we’ve selected a few @nrwl/angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nrwl / ngrx-example / apps / talks / src / app / +state / talks.effects.ts View on Github external
talks$ = createEffect(() =>
    this.actions.pipe(
      navigation(TalksAndFiltersComponent, {
        run: (r: ActivatedRouteSnapshot) => {
          const filters = createFilters(r.params as any);
          return this.backend
            .findTalks(filters)
            .pipe(map(talks => TalksActions.talksUpdated({ talks, filters })));
        },

        onError: (r: ActivatedRouteSnapshot, error) => {
          console.error('Error', error);
          throw error;
        }
      })
    )
  );
github nrwl / ngrx-example / apps / talks / src / app / +state / talks.effects.ts View on Github external
talk$ = createEffect(() =>
    this.actions.pipe(
      navigation(TalkDetailsComponent, {
        run: (r: ActivatedRouteSnapshot, state: TalksPartialState) => {
          const id = +r.paramMap.get('id');
          if (!state.talks.entities[id]) {
            return this.backend
              .findTalk(+r.paramMap.get('id'))
              .pipe(map(talk => TalksActions.talkUpdated({ talk })));
          } else {
            return of();
          }
        },

        onError: (r: ActivatedRouteSnapshot, error) => {
          console.error('Error', error);
          throw error;
        }
      })

@nrwl/angular

The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. - Gen

MIT
Latest version published 3 days ago

Package Health Score

92 / 100
Full package analysis