This module provides the Edit on Ms Office action present in Alfresco Share to be used on ADF (Alfresco Development Framework) applications.
The module was developed during the Alfresco Global Hackathon 2017 and it was a lot of fun to do it. The idea of the "Alfresco Share ADF Components" project is to create angular reusable components holding functionalities present on Alfresco Share and often used by our clients.
Special thanks to Mario Romano for kindly and patiently responding all my questions.
Before you start using this module, make sure you have properly installed and configured Alfresco Office Services (AOS) on your Alfresco Content Services installation, documentation.
For illustrating the use of the module I'll be using a demo application generated with the ng2-alfresco-app yeoman generator.
NOTE: Alfresco server and the ADF application must be accessible by a qualified hostname from within your Office client.
To configure a hostname for your ADF application with webpack-dev-server, just edit
package.json and add
--public parameter to the start script.
"start": "npm run server-versions && npm run webpack-dev-server -- --config config/webpack.prod.js --progress --public myapp.example.com:3000 --content-base app/",
Next specify the externally accessible hostname for Alfresco on
Make sure you can access both services from the Office client.
Install the ng2-alfresco-aos-editonline module into your ADF application
npm install ng2-alfresco-aos-editonline --save
|package version||ADF version|
$ yo ng2-alfresco-app $ cd example-app $ npm install $ npm install ng2-alfresco-aos-editonline --save
Edit the root module on your application to add the ng2-alfresco-aos-editonline module
For this example we are going to use the FilesComponent that comes with the application generated with yeoman. This component showcases the use of the ng2-alfresco-documentlist component which fits perfect to test the AOS action.
NOTE: Read the ContentAction component documentation for understanding the extension point here
On the FileComponent controller we need to implement the
aosEditonline(event) function, the name of the method is just and example and could be any other name, it only need to match the one defined in the HTML template.
;;...constructor...private editOnlineService: AOSEditOnlineService,private alfrescoTranslationService: AlfrescoTranslationService...ngOnInitaosEditonlineevent
$ npm start
Access your application on http:///files (after successfully logged in), navigate to a Ms document and click on the actions menu
Alternatively you can build component from sources with the following commands:
npm installnpm run build
For detailed changelog, check Releases.