docs: mention for depreciation for `Testbed.get()` (#37815)

As mention in https://angular.io/guide/deprecations for this API, it may be important mention for this to make developers migrate or avoid using it

PR Close #37815
This commit is contained in:
Omar Hasan 2020-06-29 09:20:56 +02:00 committed by Alex Rickabaugh
parent d7dd2959c8
commit a5c30733cb
1 changed files with 5 additions and 4 deletions

View File

@ -359,10 +359,11 @@ Then inject it inside a test by calling `TestBed.inject()` with the service clas
<div class="alert is-helpful">
**Note:** We used to have `TestBed.get()` instead of `TestBed.inject()`.
The `get` method wasn't type safe, it always returned `any`, and this is error prone.
We decided to migrate to a new function instead of updating the existing one given
the large scale use that would have an immense amount of breaking changes.
**Note:** `TestBed.get()` was deprecated as of Angular version 9.
To help minimize breaking changes, Angular introduces a
new function called `TestBed.inject()`, which you should use instead.
For information on the removal of `TestBed.get()`,
see its entry in the [Deprecations index](guide/deprecations#index).
</div>