this is my login.ts
import { Component } from ‘@angular/core’;
import { IonicPage, NavController, NavParams } from ‘ionic-angular’;
/**
- Generated class for the LoginPage page.
- See https://ionicframework.com/docs/components/#navigation for more info on
- Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: ‘page-login’,
templateUrl: ‘login.html’,
})
export class LoginPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
// navigateToPage(pageName: string) {
// pageName === ‘TabsPage’ ? this.navCtrl.setRoot(pageName) : this.navCtrl.push(pageName);
// }
login(event){
console.log(event);
}
}
this is my login.html
LoginPagewhile i run my app than i got this error:
TypeError: _co.login is not a function
at Object.eval [as handleEvent] (ng:///LoginPageModule/LoginPage.ngfactory.js:34:31)
at handleEvent (http://localhost:8100/build/vendor.js:14274:155)
at callWithDebugContext (http://localhost:8100/build/vendor.js:15783:42)
at Object.debugHandleEvent [as handleEvent] (http://localhost:8100/build/vendor.js:15370:12)
at dispatchEvent (http://localhost:8100/build/vendor.js:10689:25)
at http://localhost:8100/build/vendor.js:13028:38
at SafeSubscriber.schedulerFn [as _next] (http://localhost:8100/build/vendor.js:5039:36)
at SafeSubscriber.__tryOrUnsub (http://localhost:8100/build/vendor.js:20899:16)
at SafeSubscriber.next (http://localhost:8100/build/vendor.js:20846:22)
at Subscriber._next (http://localhost:8100/build/vendor.js:20786:26)
while i use console to view the error: than it shows this error:
LoginPage.html:36 ERROR CONTEXT DebugContext_
It show the error in this line:
<app-login-form (loginStatus)=“login($event)”>