From f341137b0678e7b78d7cbe98194af3cfc14ad9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Popovics=20Andr=C3=A1s?= Date: Mon, 4 Dec 2017 22:03:13 +0000 Subject: [PATCH] Update viewer documentation (#2763) --- docs/viewer.component.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/viewer.component.md b/docs/viewer.component.md index 678a10159b..997a8c8ebf 100644 --- a/docs/viewer.component.md +++ b/docs/viewer.component.md @@ -58,6 +58,7 @@ Using with file url: | allowSidebar | boolean |false | Toggle sidebar feature | | showSidebar | boolean | false | Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. | | sidebarPosition | string | right | The position of the sidebar. Can be `left` or `right`. | +| sidebarTemplate | TemplateRef | null | The template intended to be used as a sidebar. The template context contains the loaded node data. | ## Events @@ -174,6 +175,12 @@ Everything you put inside the "adf-viewer-toolbar" tags is going to be rendered The Viewer component also supports custom sidebar components and layouts. The `allowSidebar` property should be set to `true` to enable this feature. +Custom sidebar for the viewer can be injected in two different ways: +- using transclusion +- using template **(only works when using the viewer with fileNodeId)** + +#### Using transclusion + ```html @@ -182,7 +189,16 @@ The `allowSidebar` property should be set to `true` to enable this feature. ``` -Everything you put inside the "adf-viewer-sidebar" tags is going to be rendered instead of the default sidebar. +Everything you put inside the "adf-viewer-sidebar" tags is going to be rendered. + +#### Using template injection (only works when using the viewer with fileNodeId) + +```html + + + + +``` ### Custom "Open With" menu