[Solved] StaticInjectorError(Platform: core)[RegisterStoreComponent -> Router]: NullInjectorError: No provider for Router! Angular 5.2 / Karma-jasmine

add the following to the imports on your app.module.ts RouterModule.forRoot( [ { path: “”, component: LoginComponent} ] ) solved StaticInjectorError(Platform: core)[RegisterStoreComponent -> Router]: NullInjectorError: No provider for Router! Angular 5.2 / Karma-jasmine

[Solved] Know when an angular HTTP call is done

In my eyes, the clean way would be to wait until ngOnInit and then do it the way @Christian Scillitoe showed. It´s also the easiest way here. this.pointService.index().subscribe(x => { this.points = x.map(y => Point.fromJson(y) // Rest of initialization })); If you really really really want to kickof the request 5 Milliseconds up front, than … Read more

[Solved] RXJS Switchmap – is it possible on value

Wrap your simply value inside an Observable “Everything is a Stream” Observable.of(yourValue).switchMap(yourSwitchMapFunction) @pixelbits the constructor of a Subject doesn’t have any parameter, and less a value, since the productor of values of the Subject are outside the stream, if you want to use a Subject you need to do something like this: const mySubject = … Read more

[Solved] How to access values in nested JSON

Following your example (Image in your question), you can create an Angular Pipe import { PipeTransform, Pipe } from ‘@angular/core’; @Pipe({name: ‘ObjKeys’}) export class KeysPipe implements PipeTransform { transform(value, args:string[]) : any { return Object.keys(value); } } Imagine this variable following your structure let object = { “RAW”: { “ETH”: { “USD”: { “TYPE”: 5 … Read more

[Solved] i understand javascript to an intermediate level but still can’t understand angular 4 logic [closed]

It’s important to understand that AngularJS (version 1.x) and Angular (versions 2 through 4.3.x which is current) are very different frameworks. They solve the same fundamental problems, and there are similarities, but the v2 and on versions are a complete rewrite, so if you’re just learning now, I would suggest you stick to Angular, which … Read more