I just spent some time on this so replying here. if you are using typescript, your editor/the build will report an error that navigator is undefined. It will work on the device though when the cordova plugin runs.
To fix this I downloaded phonegap.d.ts, which includes all the cordova interface definitions, added it to the project, and updated tsconfig.json to include:
"files": [
"app/app.ts",
"app/phonegap.d.ts"
],
that cleared up the typescript errors and gives you typing access to all the navigator attributes