AnchovyLegend AnchovyLegend - 9 months ago 127
TypeScript Question

Property does not exist on type

I am working on a project with Ionic2 and Angular2. When trying to run

ionic serve
, the data is retrieved without any errors. However, when trying to test on ios and running
ionic build ios
, I am getting the below compile time errors, that properties do not exist.

Has anyone else encountered this issue?

I appreciate any suggestions.


import { Component } from '@angular/core';
import { ProfileService } from './profile.service';

selector: 'home',
templateUrl: 'home.html',
providers: [ProfileService]
export class HomePage {

constructor(public d: HomeService){

loadData() {
this.d.fbPromise.then( (FB) => => { = response;




<div class="profile-content" padding>
<div class="content-header">
<h2 class="name">{{ }}</h2>

<div class="interests-content">

<span *ngFor="let interest of" >
{{ interest.title }} : {{}}

Compile Time Errors:

[10:10:18] Error: Error at /Users/zzz/Sites/angular-app/Flah/.tmp/pages/home/home.ngfactory.ts:330:47
[10:10:18] Property 'name' does not exist on type 'HomeService'.
[10:10:18] Error at /Users/zzz/Sites/angular-app/Flah/.tmp/pages/home/profhomeile.ngfactory.ts:349:72
[10:10:18] Error at /Users/zzz/Sites/angular-app/Flah/.tmp/pages/home/phomerofile.ngfactory.ts:354:72
[10:10:18] Property 'interests' does not exist on type 'HomeService'.
[10:10:18] ngc failed
[10:10:18] ionic-app-script task: "build"
[10:10:18] Error: Error

Answer Source

Don't use this in view bindings

{{ }}<

should be

{{ }}<