检测浏览器类型
const { Platform } = BrowserPlatform;
console.log(new Platform());
class Platform {
isBrowser: boolean;
EDGE: boolean;
TRIDENT: boolean;
BLINK: boolean;
WEBKIT: boolean;
IOS: boolean;
FIREFOX: boolean;
ANDROID: boolean;
SAFARI: boolean;
}
See alse:
- 源码来至
@angular/cdk