@angular/cdk/layout#BreakpointState TypeScript Examples
The following examples show how to use
@angular/cdk/layout#BreakpointState.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: playground.component.ts From taiga-front-next with GNU Affero General Public License v3.0 | 6 votes |
ngOnInit(): void {
this.breakpointObserver
.observe([Breakpoints.Small, Breakpoints.HandsetPortrait])
.subscribe((state: BreakpointState) => {
console.log(state);
});
this.exampleForm = this.fb.group({
isChecked: new FormControl(false, Validators.required),
});
this.initData();
}
Example #2
Source File: responsive.service.ts From sdkgen with MIT License | 5 votes |
isBelowSm(): Observable<BreakpointState> {
return this.observer.observe(["(max-width: 575px)"]);
}
Example #3
Source File: responsive.service.ts From sdkgen with MIT License | 5 votes |
isBelowMd(): Observable<BreakpointState> {
return this.observer.observe(["(max-width: 767px)"]);
}
Example #4
Source File: responsive.service.ts From sdkgen with MIT License | 5 votes |
isBelowLg(): Observable<BreakpointState> {
return this.observer.observe(["(max-width: 991px)"]);
}
Example #5
Source File: responsive.service.ts From sdkgen with MIT License | 5 votes |
isBelowXl(): Observable<BreakpointState> {
return this.observer.observe(["(max-width: 1199px)"]);
}