Unexpected token. A constructor, method,accessor or property expected
<p>I was following a tutorial and wanted to get data across pages, but I dont understand why it is showing this error.
my code:</p>

<p>about.ts(page1, sending data from here)</p>

<pre><code>import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

@Component({
selector: 'page-about',
templateUrl: 'about.html'
})
export class AboutPage {

param1:string; param2:string;

constructor(public navCtrl: NavController) {
param1 = ""; param2 = "";
}


this.navCtrl.push(SecondPage, {
param1: 'John', param2: 'Johnson'
});

}
</code></pre>

<p>home.ts(page1, sending data on this page)</p>

<pre><code>import { Component } from '@angular/core';


import { NavController, NavParams } from 'ionic-angular';

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

constructor(public navCtrl: NavController, private navParams: NavParams) {

}

this.parameter1 = navParams.get('param1'); 
this.parameter2 = navParams.get('param2');
alert(this.parameter1);

}
</code></pre>

<p>heres the error screenshot
<a href="https://i.stack.imgur.com/2eVMv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2eVMv.jpg" alt="enter image description here"></a></p>

<p>screenshot continued
<a href="https://i.stack.imgur.com/J6gTk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J6gTk.jpg" alt="enter image description here"></a></p>