Skip to content

Commit 7fb5a21

Browse files
committed
Use service export from @ember/service module
1 parent b3fff8a commit 7fb5a21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/release/in-depth-topics/native-classes-in-depth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ will be described in greater detail later on in the guides.
499499
Instances can also make use of injection if they are embedded into the application container. To achieve this, you need to call [`setOwner`](https://api.emberjs.com/ember/3.27/functions/@ember%2Fapplication/setOwner) on the instance and supply the container. You can access the container by calling [`getOwner`](https://api.emberjs.com/ember/3.27/functions/@ember%2Fapplication/getOwner) on any framework object (components, services, routes, etc.).
500500

501501
```js
502-
import { inject as service } from '@ember/service';
502+
import { service } from '@ember/service';
503503
import { getOwner, setOwner } from '@ember/application';
504504

505505
class Item {
@@ -518,7 +518,7 @@ item.addToCart();
518518

519519
Alternatively, you can call `setOwner` in the class constructor and simply supply the caller as an argument to the constructor.
520520
```js
521-
import { inject as service } from '@ember/service';
521+
import { service } from '@ember/service';
522522
import { getOwner, setOwner } from '@ember/application';
523523

524524
class Item {

0 commit comments

Comments
 (0)