Content statement getting syntax error [closed]


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';

                templateUrl: 'build/pages/page1/page1.html'
            export class Page1 {
                @ViewChild(Content) content: Content;
                constructor() {
                    console.log("burda content: " + this.content);


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


Finally I get it. There are many example code everywhere that are coded with different language(js, typescript), different version (alpha, beta, latest beta bla bla…), different library (angular2, @angular, good angular very good angular…)

Even ionic2 documentation is confusing. I create a new project according the documentation step by step and I add a bit of code from forum topic and boom. Becaouse of this: some codes writen with js, some of others writen with typescript. It is so bad, really bad.So I can not trust any solution, any code, any trick; beacuse so angular2 world so chaotic.