2020-02-26 03:03:53 -06:00
|
|
|
+++
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
# Do not edit this file. It is automatically generated by API Documenter.
|
|
|
|
# -----------------------------------------------------------------------
|
2020-04-21 03:41:50 -05:00
|
|
|
title = "getTemplateSrv"
|
2020-02-26 03:03:53 -06:00
|
|
|
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
|
|
|
type = "docs"
|
|
|
|
+++
|
|
|
|
|
2020-04-21 03:41:50 -05:00
|
|
|
## getTemplateSrv variable
|
2020-02-26 03:03:53 -06:00
|
|
|
|
2020-04-21 03:41:50 -05:00
|
|
|
### getTemplateSrv variable
|
|
|
|
|
|
|
|
Used to retrieve the [TemplateSrv](./runtime/templatesrv.md) that can be used to fetch available template variables.
|
2020-02-26 03:03:53 -06:00
|
|
|
|
|
|
|
<b>Signature</b>
|
|
|
|
|
|
|
|
```typescript
|
2020-04-21 03:41:50 -05:00
|
|
|
getTemplateSrv: () => TemplateSrv
|
2020-02-26 03:03:53 -06:00
|
|
|
```
|
|
|
|
<b>Import</b>
|
|
|
|
|
|
|
|
```typescript
|
2020-04-21 03:41:50 -05:00
|
|
|
import { getTemplateSrv } from '@grafana/runtime';
|
2020-02-26 03:03:53 -06:00
|
|
|
```
|