accroding the doumentation: when I want to get scroll handler, I should access page content component.
But this code getting sytnax error whlie running with ionic serve
import {ElementRef, ViewChild} from "@angular/core";
import {Page, Content} from 'ionic-angular';
@Page({
templateUrl: 'build/pages/page1/page1.html'
})
export class Page1 {
@ViewChild(Content) content: Content;
constructor() {
console.log("burda content: " + this.content);
}
}
Error:
SyntaxError: c:/Users/xxx/Source/Repos/prj/app/pages/page1/page1.js:
Unexpected token (9:31) while parsing file: c:\Users\xxx\Source\Repos\prj\app\pages\page1\page1.js
My system information:
Cordova CLI: 6.0.0
Ionic Framework Version: 2.0.0-beta.7
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Windows 8.1
Node Version: v5.6.0