import { Health } from '@awesome-cordova-plugins/health/ngx';
constructor(private health: Health) { }
...
this.health.isAvailable()
.then((available:boolean) => {
console.log(available);
this.health.requestAuthorization([
'distance', 'nutrition',
{
read: ['steps'],
write: ['height', 'weight']
}
])
.then(res => console.log(res))
.catch(e => console.log(e));
})
.catch(e => console.log(e));