NativeScript / playground-feedback

Feedback for NativeScript Playground
Apache License 2.0
16 stars 1 forks source link

ERROR TypeError: _co.onTap is not a function #207

Closed shazaib491 closed 3 years ago

shazaib491 commented 3 years ago

ERROR TypeError: _co.onButtonTap is not a function in nativescript playground how to fix that issue

Problem

home.html

    </StackLayout>
</ScrollView>

.ts import { Component, OnInit } from "@angular/core"; import { GestureEventData } from "tns-core-modules/ui/gestures";@Component({ selector: "Home", moduleId: module.id, templateUrl: "./home.component.html", styleUrls: ["./home.component.css"] }) export class HomeComponent implements OnInit { constructor() { } ngOnInit(): void { } onTap(args: GestureEventData) { console.log("Tap!"); console.log("Object that triggered the event: " + args.object); console.log("View that triggered the event: " + args.view); console.log("Event name: " + args.eventName); } }

Did you try it outside of {N} Playground?

  • No

Which browser are you using?

  • Chrome

Are there any errors/warnings logged in your browser console?

Which platform(s) does your issue occur on?

  • Android

Are there any entries logged in the Device Logs tab?

[Galaxy A71]: ERROR TypeError: _co.onButtonTap is not a function

Please provide the following information shown in the devices tab in the playground:

  • Preview app version
  • Runtime version