mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Docs] Update root registration in README.
https://github.com/nasa/openmct/issues/1251
This commit is contained in:
parent
891412bdb9
commit
6ec858b237
13
API.md
13
API.md
@ -118,18 +118,11 @@ To do so, use the [`addRoot`]{@link module:openmct.ObjectAPI#addRoot} method
|
||||
of the [object API]{@link module:openmct.ObjectAPI}:
|
||||
|
||||
```
|
||||
openmct.objects.addRoot({
|
||||
identifier: { key: "my-key", namespace: "my-namespace" }
|
||||
name: "My Root-level Object",
|
||||
type: "my-type"
|
||||
});
|
||||
openmct.objects.addRoot({ key: "my-key", namespace: "my-namespace" });
|
||||
```
|
||||
|
||||
You can also remove this root-level object via its identifier:
|
||||
|
||||
```
|
||||
openmct.objects.removeRoot({ key: "my-key", namespace: "my-namespace" });
|
||||
```
|
||||
Root objects are loaded just like any other objects, i.e. via an object
|
||||
provider.
|
||||
|
||||
### Adding Composition Providers
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user