21 lines
935 B
Plaintext
21 lines
935 B
Plaintext
import { Meta } from '@storybook/addon-docs';
|
|
|
|
<Meta title="Guides/Umbraco Controller" parameters={{ previewTabs: { canvas: { hidden: true } } }} />
|
|
|
|
# Umbraco Controller
|
|
|
|
This class can be used as the base of any class.
|
|
This will enable Controllers to be hosted in this class. Additionally it provides few shortcut methods for initializing core Umbraco Controllers.
|
|
|
|
```ts
|
|
observe<T>(source: Observable<T>, callback: (_value: T) => void, unique?: string): UmbObserverController<T>
|
|
|
|
provideContext<R = unknown>(alias: string | UmbContextToken<R>, instance: R): UmbContextProviderController<R>
|
|
|
|
consumeContext<R = unknown>(alias: string | UmbContextToken<R>, callback: UmbContextCallback<R>): UmbContextConsumerController<R>
|
|
```
|
|
|
|
Read about the 'observe' method in the [Store-API](?path=/docs/guides-store--docs).
|
|
|
|
Read about the 'provideContext' and 'consumeContext' methods in the [Context-API](?path=/docs/guides-context-api--docs).
|