mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(layout): fix media matcher code snippet (#7475)
This commit is contained in:
@@ -9,7 +9,7 @@ matchMedia method, if available on the platform.
|
||||
export class MyWidget {
|
||||
constructor(mm: MediaMatcher) {
|
||||
mm.matchMedia('(orientation: landscape)').matches ?
|
||||
this.setPortraitMode() :
|
||||
this.setLandscapeMode() :
|
||||
this.setPortraitMode();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user