mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
metadata service
This commit is contained in:
19
src/app/shared/mocks/mock-host-window-service.ts
Normal file
19
src/app/shared/mocks/mock-host-window-service.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
// declare a stub service
|
||||
export class MockHostWindowService {
|
||||
|
||||
private width: number;
|
||||
|
||||
constructor(width) {
|
||||
this.setWidth(width);
|
||||
}
|
||||
|
||||
setWidth(width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
isXs(): Observable<boolean> {
|
||||
return Observable.of(this.width < 576);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user