Navigation ID is not equal to the current router navigation id error

I figured it out! There was code in a component that was calling router.navigate() on a NavigationEnd event. So the answer was similar to the answer in this S.O. issue (rapidly changing the route). I got this error because I was calling router.navigate twice in quick succession, (1 to append queryParams, 1 to append a … Read more

NgRX effects – Type ‘Observable’ is not assignable to type ‘Observable’

Quick version comment out createEffect(() =>, fix errors that your IDE (VSCode) flags up, add createEffect(() => back in. Alternative – rewriting like the following also works someEffect$ = createEffect(() => { return this.actions$.pipe( … ) }) Additional Still errors after doing the above? Type-checking is doing it’s job correctly and telling you that you … Read more

Angular2 router VS ui-router-ng2 VS ngrx router

General information NGRX Router docs ngrx router is Deprecated! There is migration strategy from ngrx router to the standard Angular2 Router. Angular2 Router docs Default solution from Angular team Was inspired by UI-router from AngularJS Built for components Angular2 Router has almost all UI-router features. NG2 UI-router docs Well known UI-router from AngularJS updated for … Read more

dispatch multiple actions in one effect

@Effect() loadInitConfig$ = this.actions$ .ofType(layout.ActionTypes.LOAD_INIT_CONFIGURATION) .map<Action, void>(toPayload) .switchMap(() => this.settingsService .loadInitConfiguration() .mergeMap((data: any) => [ new layout.LoadInitConfigurationCompleteAction(data.settings), new meetup.LoadInitGeolocationCompleteAction(data.geolocation) ]) .catch(error => Observable.of( new layout.LoadInitConfigurationFailAction({ error }) ) ) );

NgrxStore and Angular – Use the async pipe massively or subscribe just once in the constructor

Neither, you should compose your application as smart and presentation components. Advantages: All buissness logic on the smart controller. Just one subscribe Reusability The presentation controller has only one responsibility, only to present data and does not know from where the data come from. (loosely coupled) Answering the last question: The massive use of async … Read more

how to subscribe to action success callback using ngrx and effects

You can subscribe to actions in components as well: […] import { Actions } from ‘@ngrx/effects’; […] @Component(…) class SomeComponent implements OnDestroy { destroyed$ = new Subject<boolean>(); constructor(updates$: Actions) { updates$.pipe( ofType(PostActions.SAVE_POST_SUCCESS), takeUntil(this.destroyed$) ) .subscribe(() => { /* hooray, success, show notification alert etc.. */ }); } ngOnDestroy() { this.destroyed$.next(true); this.destroyed$.complete(); } }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)