Build Your First App error

Hi everyone,
I’m new to ionic and am trying to build the photo-gallery sample app for Angular aka Build Your First App. When I copy the instructed piece of code into the file, the app shows this following error.

Failed to compile.

src/app/services/photo.service.ts:1:1 - error TS1128: Declaration or statement expected.

1 public async addNewToGallery() {

My file looks as following : 

import { Component } from '@angular/core';

selector: 'app-tab2',
templateUrl: '',
styleUrls: ['']
export class Tab2Page {

constructor() {}


import { PhotoService } from '../services/photo.service';

constructor(public photoService: PhotoService) { }

addPhotoToGallery() {

Any help would be appreciated, Thank you.

Well, it looks like you’re missing a closing ‘}’.

I can’t see where am I missing the closing ‘}’ ? Can you explain to me where, please?

At the very end. Tab2Page does not look properly closed to me.