Contezza Documentlist Library
Installing library in default angular project steps:
- add
"@contezza/documentlist": "0.0.1"to dependency in package.json of usenpm install @contezza/documentlist add assets in
angular.json:{ "glob": "**/*", "input": "node_modules/@alfresco/adf-core/prebuilt-themes", "output": "/assets/prebuilt-themes"}, { "glob": "**/*", "input": "node_modules/@alfresco/adf-core/bundles/assets", "output": "/assets" }, { "glob": "**/*", "input": "node_modules/@alfresco/adf-content-services/bundles/assets", "output": "/assets" }, { "glob": "pdf.worker.js", "input": "node_modules/pdfjs-dist/build", "output": "/" }, { "glob": "pdf.worker.min.js", "input": "node_modules/pdfjs-dist/build", "output": "/" }create a file next to projects package.json call it proxy.conf.json with the following content:
{
"/ecm": {
"target": {
"host": "0.0.0.0",
"protocol": "http:",
"port": 8080
},
"pathRewrite": {
"^/ecm": ""
},
"secure": false,
"changeOrigin": true
}
}run the following command to start the server with the proxy configuration:
ng serve --proxy-config proxy.conf.json --openof define config inangular.jsonwith:"port": 4200, "host": "0.0.0.0", "open": true, "proxyConfig": "proxy.conf.json"import 'hammerjs' to
main.jsfile:import 'hammerjs';be sure that angular theming is imported in
styles.scssfile:@import '~@alfresco/adf-core/prebuilt-themes/adf-blue-orange.css';import
DocumentlistModulein your 'APP' module from'@contezza/documentlist';use documentlist in template:
<contezza-documentlist [username]="'admin'" [password]="'admin'"> </contezza-documentlist>