Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70749

Error when adding parameter in page constructor

$
0
0

@mobh13 wrote:

hello,

I’m facing this weird problem, when I pass a service provider as a parameter in the page class constructor, the page won’t show anything like there is no page.

the page class code is

import { Component, OnInit } from "@angular/core";
import { CognitoServiceService } from "../cognito-service.service";

@Component({
  selector: "app-login-main",
  templateUrl: "./login-main.page.html",
  styleUrls: ["./login-main.page.scss"]
})
export class LoginMainPage {
  constructor(public CognitoSerive: CognitoServiceService) {
  }
  email: string;
  password: string;


  login() {
    this.CognitoSerive.authenticate(this.email, this.password).then(
      res => {
        console.log(res);
      },
      err => {
        console.log(err);
      }
    );
  }
}

i’m new and couldn’t find anything to help me with this.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70749

Trending Articles



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