Skip to content

Commit

Permalink
Merge pull request #42 from infra-geo-ouverte/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
drekss authored Jun 10, 2020
2 parents 83102ba + f1af5ed commit d098469
Show file tree
Hide file tree
Showing 44 changed files with 635 additions and 102 deletions.
15 changes: 15 additions & 0 deletions demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Renderer2
} from '@angular/core';

import { userAgent } from '@igo2/utils';
import { version } from '@igo2/core';

@Component({
Expand All @@ -31,9 +32,23 @@ export class AppComponent implements OnDestroy {
this.mobileQuery.addListener(this._mobileQueryListener);

this.renderer.addClass(document.body, this.themeClass);

this.detectOldBrowser();
}

ngOnDestroy(): void {
this.mobileQuery.removeListener(this._mobileQueryListener);
}

private detectOldBrowser() {
const oldBrowser = userAgent.satisfies({
ie: '<11',
chrome: '<64',
firefox: '<60'
});

if (oldBrowser) {
console.log('Very old browser ! ', userAgent.getBrowser());
}
}
}
Loading

0 comments on commit d098469

Please sign in to comment.