Skip to content

Conversation

@Ninarchive
Copy link

I tried

<mat-dialog-content>
<label for="IBANinput">IBAN:</label>
<input [formControl]="ibanInput" type="text" name="IBANinput">
<p> We ship our socks without fee(t)s!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, nice one!

const sockId = params['id'];
this.sock$ = this.socksService.getById(sockId);
})
).subscribe();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In plaats van 1x een subscribe te doen, probeer een pipeline te declareren die altijd correct is:

sock$ = this.route.paramMap.pipe(
    map(params => +(params.get('id') ?? 1)),
    switchMap(sockId => this.socksService.getById(sockId))
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants