Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

TypeError: Object(...) is not a function: WHY?

$
0
0

Hi guys, I’m trying to use the “App Rate”, but I’m having an error, it’s returning:

TypeError: Object(...) is not a function
    at AppRate.get (http://localhost:8100/build/vendor.js:196358:113)
    at HomePage.webpackJsonp.60.HomePage.PomptUserForAppRating (http://localhost:8100/build/main.js:11112:22)
    at Object.eval [as handleEvent] (ng:///AppModule/HomePage.ngfactory.js:673:31)
    at Object.handleEvent (http://localhost:8100/build/vendor.js:13609:172)
    at Object.handleEvent (http://localhost:8100/build/vendor.js:14336:29)
    at dispatchEvent (http://localhost:8100/build/vendor.js:10058:25)
    at http://localhost:8100/build/vendor.js:10672:38
    at HTMLButtonElement.<anonymous> (http://localhost:8100/build/vendor.js:37434:53)
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15660)
    at Object.onInvokeTask (http://localhost:8100/build/vendor.js:4974:33)

In TS:

import { AppRate } from '@ionic-native/app-rate/ngx';


@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage implements OnInit{

 constructor(public appRate: AppRate)

 PomptUserForAppRating() {
    this.appRate.preferences.storeAppURL = {
        android: 'market://details?id=com.parent.attendance'
    }
     this.appRate.promptForRating(true);
  }

}

HTML BTN FOR TESTING:
<button ion-button (click)="PomptUserForAppRating()">OLA MUNDAO DE DEUS</button>

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>