I used two services 1. connection-service and 2. sales-service
The connection service contains information about ip and port. I need to get ip and port from first service to sales service. so that I can complete the url used to get json.
Removed part of the coding here, please take a look at my repo on Update # 3
Error. I get
2 007892 error EXCEPTION: No provider for t! 3 007893 error ORIGINAL STACKTRACE: 4 007893 error Error: No provider for t! at e.Error (native) at e [as constructor] (http://192.168.1.48:8100/build/main.js:5:4700) at e [as constructor] (http://192.168.1.48:8100/build/main.js:5:9276) at new e (http://192.168.1.48:8100/build/main.js:5:9604) at t._throwOrNull (http://192.168.1.48:8100/build/main.js:5:26583) at t._getByKeyDefault (http://192.168.1.48:8100/build/main.js:5:26939) at t._getByKey (http://192.168.1.48:8100/build/main.js:5:26494) at t.get (http://192.168.1.48:8100/build/main.js:5:22859) at e.get (http://192.168.1.48:8100/build/main.js:7:14254) at e.get (http://192.168.1.48:8100/build/main.js:8:1442) 5 007895 error Uncaught Error: No provider for t!, http://192.168.1.48:8100/build/polyfills.js, Line: 3
My ionic information
Cordoba CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
Ios-deploy version: not installed
Ios-sim version: not installed
OS: Mac OS X El Capitan
Node Version: v6.7.0
Xcode Version: Xcode 7.3.1 Build version 7D1014
from the stack trace, I understand that I need to use something like a provider: [ConnectionService], but I donβt know how to use it in Sales-Service. Any advice would be helpful. Thanks.
Update # 1
I tried embedding both services in the app.module.ts file as follows
- providers: [ConnectionService, SalesService] // works thanks to @jmilloy and @camaron .
Update # 2
I created a new project and I replicated the error that says
No provider FirstService!
but in my original project the error should say
There is no provider for ConnectionService!
// instead, he says
There is no provider for t! // what does it mean like t?
Update # 3 I uploaded my project to my repo. check this.
This is my initial project repo // The problem is solved, I had to clear the npm cache.
This is my new repo project // Problem solved based on the response received