How to get this plugin worked with javascript?
nrbn opened this issue · comments
Seems to be working for me, a Hello World example:
`const Ratings = require('nativescript-ratings').Ratings;
function onNavigatingTo(args) {
var page = args.object;
page.bindingContext = createViewModel();
let ratings = new Ratings({
id: "appname-1.0.0",
showOnCount: 1,
title: "Please rate",
text: "Will you please rate my app?",
agreeButtonText: "Rate Now",
remindButtonText: "Remind Me Later",
declineButtonText: "No Thanks",
androidPackageId: "com.nativescript.demo",
iTunesAppId: "12345"
});
ratings.init();
ratings.prompt();
}
exports.onNavigatingTo = onNavigatingTo;`