Server side rendering fails because of “navigator.userAgent” use in autoclose

Bug description:

The server side rendering fails with ReferenceError: navigator is not defined. It is caused by the following:

const iOS = !!navigator.userAgent && /iPad|iPhone|iPod/.test(navigator.userAgent);

Link to minimally-working StackBlitz that reproduces the issue:

Not applicable because of server side rendering.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 7.2.4

ng-bootstrap: 4.0.3

Bootstrap: 4.3.1

1 possible answer(s) on “Server side rendering fails because of “navigator.userAgent” use in autoclose