diff --git a/ng2-components/ng2-alfresco-viewer/README.md b/ng2-components/ng2-alfresco-viewer/README.md index d28758eba1..069be18ac8 100644 --- a/ng2-components/ng2-alfresco-viewer/README.md +++ b/ng2-components/ng2-alfresco-viewer/README.md @@ -69,6 +69,30 @@ Make sure your systemjs.config has the following configuration: ``` +Example of an App that declares the file viewer component : + +```ts +import { Component } from 'angular2/core'; +import { bootstrap } from 'angular2/platform/browser'; +import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer'; + +@Component({ + selector: 'my-app', + template: ` +
+
`, + directives: [VIEWERCOMPONENT] +}) +class MyDemoApp { + constructor() { + console.log('constructor'); + } +} +bootstrap(MyDemoApp, [ + VIEWERCOMPONENT +]); +``` + #### Options Attribute | Options | Default | Description