Quando entro na page de cadastro, aparece o seguinte erro:
Error: Uncaught (in promise): Error: No provider for AgendamentosServiceProvider!
Error: No provider for AgendamentosServiceProvider!
at injectionError (http://localhost:8100/build/vendor.js:1526:90)
at noProviderError (http://localhost:8100/build/vendor.js:1564:12)
at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/vendor.js:3006:19)
at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/vendor.js:3045:25)
at ReflectiveInjector_._getByKey (http://localhost:8100/build/vendor.js:2977:25)
at ReflectiveInjector_.get (http://localhost:8100/build/vendor.js:2846:21)
at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9846:25)
at NgModuleRef_.get (http://localhost:8100/build/vendor.js:10934:16)
at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9846:25)
at NgModuleRef_.get (http://localhost:8100/build/vendor.js:10934:16)
at c (http://localhost:8100/build/polyfills.js:3:19132)
at Object.reject (http://localhost:8100/build/polyfills.js:3:18554)
at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:44524:16)
at NavControllerBase._failed (http://localhost:8100/build/vendor.js:44512:14)
at http://localhost:8100/build/vendor.js:44567:59
at t.invoke (http://localhost:8100/build/polyfills.js:3:14356)
at Object.onInvoke (http://localhost:8100/build/vendor.js:4247:33)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14296)
at r.run (http://localhost:8100/build/polyfills.js:3:9523)
at http://localhost:8100/build/polyfills.js:3:19622
Diz que o erro está no provider, porém não identifico nenhum erro:
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable()
export class AgendamentosServiceProvider {
private _url = 'http://localhost:8080/api';
constructor( private _http: HttpClient ) {
}
agenda(agendamento){
return this._http.post(this._url+ '/agendamento/agenda',agendamento);
}
}