Bash substring, prefix, suffix
Substring $ a=teststring $ echo ${a:2:5} ststr Remove prefix (#) $ a=text_test.txt $ echo ${a#*_} test.txt Remove suffix (%) $ a=text_test.txt $ echo ${a%.txt} text_test
Substring $ a=teststring $ echo ${a:2:5} ststr Remove prefix (#) $ a=text_test.txt $ echo ${a#*_} test.txt Remove suffix (%) $ a=text_test.txt $ echo ${a%.txt} text_test
@Component({ … }) export class TestingComponent implements OnInit { units: any; constructor(private restService:RestService) { } ngOnInit() { this.units = this.restService.getUnits(); } }@Component({ … }) export class TestingComponent implements OnInit { units: any; constructor(private restService:RestService) { } ngOnInit() { this.units = this.restService.getUnits(); } } Template <ng-template #loading>Loading…</ng-template> <div *ngIf="units|async as units; else loading"> <span *ngFor="let unit Read more about AsyncPipe example[…]