Docs: run the api-extractor on master to update docs (#23726)

* regenerated packages docs.

* fixed spelling issues.

* fixed spelling issues.
This commit is contained in:
Marcus Andersson
2020-04-21 10:41:50 +02:00
committed by GitHub
parent 017767ae39
commit a2d741f60f
275 changed files with 6448 additions and 2193 deletions

View File

@ -10,6 +10,8 @@ draft = true
## AngularComponent interface
Used to enable rendering of Angular components within a React component without losing proper typings.
<b>Signature</b>
```typescript
@ -20,16 +22,49 @@ export interface AngularComponent
```typescript
import { AngularComponent } from '@grafana/runtime';
```
## Example
```typescript
class Component extends PureComponent<Props> {
element: HTMLElement;
angularComponent: AngularComponent;
componentDidMount() {
const template = '<angular-component />' // angular template here;
const scopeProps = { ctrl: angularController }; // angular scope properties here
const loader = getAngularLoader();
this.angularComponent = loader.load(this.element, scopeProps, template);
}
componentWillUnmount() {
if (this.angularComponent) {
this.angularComponent.destroy();
}
}
render() {
return (
<div ref={element => (this.element = element)} />
);
}
}
```
<b>Methods</b>
| Method | Description |
| --- | --- |
| [destroy()](#destroy-method) | |
| [digest()](#digest-method) | |
| [getScope()](#getscope-method) | |
| [destroy()](#destroy-method) | Should be called when the React component will unmount. |
| [digest()](#digest-method) | Can be used to trigger a re-render of the Angular component. |
| [getScope()](#getscope-method) | Used to access the Angular scope from the React component. |
### destroy method
Should be called when the React component will unmount.
<b>Signature</b>
```typescript
@ -41,6 +76,8 @@ destroy(): void;
### digest method
Can be used to trigger a re-render of the Angular component.
<b>Signature</b>
```typescript
@ -52,6 +89,8 @@ digest(): void;
### getScope method
Used to access the Angular scope from the React component.
<b>Signature</b>
```typescript