Typescript Error ',' expected

image

Hi everyone,
I keep getting this errors claiming Typescript Error ‘,’ expected. Can someone help me out? Thanks.

Here is my ionic info

global packages:

@ionic/cli-utils : 1.3.0
Cordova CLI      :  You have been opted out of telemetry. To change this, run: cordova telemetry on. 7.0.1 
Ionic CLI        : 3.3.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.3.0
@ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms               : You have been opted out of telemetry. To change this, run: cordova telemetry on.
Ionic Framework                 : ionic-angular 3.3.0

System:

Node       : v6.10.3
OS         : macOS Sierra
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

This looks like syntax error. Can you post your code on search.ts?

It’s a simple typo.

You are writing HTTP in all caps, in fact you need to write it as Http.

import { Http } from '@angular/http';

  constructor(private http: Http,

Hope that solves the issue!

Figured it out in the end. There were a few problems.

  1. I was supposed to put private http: HTTP inside the existing constructor

  2. The HTTP native plugin would not run on ionic lab and has to be run natively on an android or ios device