I am trying this as the example but it is not working
import { Sim } from 'ionic-native';
@Component({
selector: 'page',
templateUrl: 'page.html'
})
export class page {
constructor(public navCtrl: NavController ) { }
sim() {
sim.getSimInfo().then(
(info) => console.log('Sim info: ', info),
(err) => console.log('Unable to get sim info: ', err)
);
}
}
I’m getting this error:
';' expected.
sim.getSimInfo().then(
(info) => console.log('Sim info: ', info),
Declaration or statement expected.
Function implementation is missing or not immediately following the declaration.
How does this plugin works