« first day (2561 days earlier)      last day (1541 days later) » 

12:26 AM
I'm not sure if I'm using the right verbiage when googling, but I was wondering how I can use an observable callback to handle multiple lines of code.

this.productService.getProducts().subscribe({
next: products => {
this.products = products
this.filteredProducts = products
},
error: err => this.errorMessage = err

// next(products) {
// this.products = products
// this.filteredProducts = products},
// error(err) {this.errorMessage = err}
 
1 message moved from JavaScript
1 message moved from JavaScript
 
 
10 hours later…
@Natty tp
 
 
8 hours later…
 
3 hours later…
9:54 PM
switch(this.restroomDetails['restroomTypeSelection']) {
case 'women':
this.restroomDetails['restroomTypeSelection'] = 'womens';
break;
case 'men':
this.restroomDetails['restroomTypeSelection'] = 'mens';
break;
default:
this.restroomDetails['restroomTypeSelection'] = 'both'
}
 
1 message moved from JavaScript
 

« first day (2561 days earlier)      last day (1541 days later) »