javascript - Ionic 2: typescript: typescript: Cannot find name 'EventStaffLogService' -


i'm having error. i've installed latest app scripts. don't know typescript used work before ran update scripts.

cli

$ ionic serve  running 'serve:before' npm script before serve  > ionic-hello-world@ watch c:\users\cmadmin\development\mobile\sportsinfocus-mobile-app > ionic-app-scripts watch  [14:01:26]  ionic-app-scripts 0.0.42 [14:01:26]  watch started ... [14:01:26]  build dev started ... [14:01:26]  clean started ... [14:01:26]  clean finished in 6 ms [14:01:26]  copy started ... [14:01:26]  transpile started ... [14:01:32]  typescript: ...sportsinfocus-mobile-app/src/app/events/event-sign-in/event-sign-in.component.ts, line: 18         cannot find name 'eventstafflogservice'. event-sign-in.component.ts 

event-sign-in.component.ts

import { component } '@angular/core'; import { navcontroller, navparams, toastcontroller } 'ionic-angular'; import { eventstafflogservice, eventstaff } '../shared/';  @component({   templateurl: 'event-sign-in.component.html',   providers: [eventstafflogservice] }) export class eventsignincomponent {   eventstaff: any;   eventstafflogs: object = { data: [] };   fetchinglogs: boolean = true;   issignin: boolean = false;    constructor(     private navctrl: navcontroller,     private navparams: navparams,     private eventstafflogservice: eventstafflogservice,     public toastcontroller: toastcontroller   ) {     this.eventstaff = navparams.get('eventstaff');     this.geteventstafflogs();   }   ... 

just found issue. seems importing index.ts file causes error.

changed code from:

import { eventstafflogservice, eventstaff } '../shared/'; 

to

import { eventstafflogservice } '../shared/event-staff-log.service'; import { eventstaff } '../shared/event-staff.model'; 

and worked.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -