0

The question is self explanatory, I have seen that since the @Injectables are not components, I cannot use the traditional @Input and @Output to get this job done. Thanks in advance !

2
  • why you cannot use? What is that you are looking for ? Read this asking help before you ask. Commented Apr 14, 2017 at 11:26
  • 1
    You can inject one service into another. The rest is self explanatory ;-) Commented Apr 14, 2017 at 11:27

1 Answer 1

1

You can inject one injectable into second injectable via constructor:

import { SecureHttp } from './secureHttp.service';

@Injectable()
export class IdentityService {

  constructor(private http: SecureHttp) { }
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks that was helpful :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.