Hello, I’d really appreciate it if someone helped me with this please
I think the code is correct but I can’t seem to display it on screen
This is my code:
ts:
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import {who_am_iPage } from '../who am i/who am i';
@Component({
selector: 'page-tell_us_more',
templateUrl: 'tell us more.html'
})
export class tell_us_morePage {
generate: () => void;
constructor(public navCtrl: NavController, public navParams: NavParams) { }
openwhoami() {
this.navCtrl.push(who_am_iPage);
}
randnumb() {
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
this.generate= function () {
this.number = getRandomInt(1000, 9999);
}
this.generate();
}
ionViewDidLoad() {
console.log('ionViewDidLoad tell_us_morePage');
}
}
and this is my HTML:
<ion-item>
<button ion-button large color="light" style="text-transform: capitalize"
click="generate()">Generate PIN</button>
</ion-item>
<div align="center" ng-if="counter">
<h1>PIN:{{number}}</h1>
</div>
<p>use the PIN for important changes later</p>
Thank you for your Help!