update readme file viewer

This commit is contained in:
Mario Romano
2016-06-01 11:49:37 +01:00
parent cfdaec4e20
commit 00708dc300

View File

@@ -69,6 +69,30 @@ Make sure your systemjs.config has the following configuration:
<ng2-alfresco-viewer [urlFile]="'filename.pdf'"></ng2-alfresco-viewer>
```
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: ` <alfresco-viewer [urlFile]="'local_filename.pdf'">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>`,
directives: [VIEWERCOMPONENT]
})
class MyDemoApp {
constructor() {
console.log('constructor');
}
}
bootstrap(MyDemoApp, [
VIEWERCOMPONENT
]);
```
#### Options
Attribute | Options | Default | Description