Issue
I added the Platform module to my project, but it fails to detect Edge browsers (Material V12.2.7, Windows 10, Edge V94).
I created this StackBlitz that tests the issue and prints the Platform
output, and strangely enough, when I open the StackBlitz from an Edge browser, it fails to detect it.
Does anyone else have this issue or am I doing something wrong?
import { Platform } from '@angular/cdk/platform';
import { Component } from '@angular/core';
@Component({
...
})
export class AppComponent {
isEdge: boolean;
constructor(private platformService: Platform) {
this.isEdge = this.platformService.EDGE; // always false!
}
}
Testing the StackBlitz from Edge browser:
Solution
According to this link:
https://www.decodedfrontend.io/detect-browser-and-os-with-angular-cdk-platform-module/
The newer Edge browsers use also the Blink Engine. So thats why you don't see Edge on true
Answered By - Ties Theunissen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.