Alfresco

Running Alfresco AngularJS Application (0.5.1) without Activiti Explorer

This BLOG is explaining what all changes you need to make to start Alfresco AngularJS client without Activiti explorer.


Make sure that you are using the latest version of alfresco-community(5.2.a).

If you are using an older version, you need to enable CORS manually for alfresco AngularJS application to connect to your Alfresco repository.

This BLOG assumes that you have already generated AngularJS application by referring below links:

https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md (for prerequisites) and

https://github.com/Alfresco/generator-ng2-alfresco-app (for alfresco AngularJS application generation).


Related Blog: How to Integrate Ephesoft and Alfresco


You only want to use it as an ECM without installing Activiti. In order to achieve this follow the below steps:

1.  Find a file files.component.ts on a path ./app/components/files.
2.  Edit that file and replace the code of that file with the code given below :

 import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { 
 DocumentActionsService,
 DocumentList 
} from 'ng2-alfresco-documentlist';
 import { FormService } from 'ng2-activiti-form';
 
 declare let __moduleName: string;
 
 @Component({ 
 moduleId: __moduleName,
 selector: 'files-component',
 templateUrl: './files.component.html',
 styleUrls: ['./files.component.css'] 
})
 export class FilesComponent {
 currentPath: string = '/Sites/swsdp/documentLibrary';
 
 fileNodeId: any; 
 fileShowed: boolean = false;
 multipleFileUpload: boolean = false;
 folderUpload: boolean = false;
 acceptedFilesTypeShow: boolean = false;
 versioning: boolean = false;
 
 acceptedFilesType: string = '.jpg,.pdf,.js';
 @ViewChild(DocumentList) 
 documentList: DocumentList;
 
 constructor(private documentActions: DocumentActionsService,
 private formService: FormService,
 private router: Router) { 
 documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
 } 
 
 myDocumentActionHandler(obj: any) { 
 window.alert('my custom action handler');
 } 
 
 myCustomAction1(event) { 
 alert('Custom document action for ' + event.value.entry.name);
 } 
 
 myFolderAction1(event) { 
 alert('Custom folder action for ' + event.value.entry.name);
 } 
 
 showFile(event) { 
 if (event.value.entry.isFile) { 
 this.fileNodeId = event.value.entry.id;
 this.fileShowed = true; } 
 else { 
 this.fileShowed = false;
 } 
 } 
 
 onFolderChanged(event?: any) { 
 if (event) { 
 this.currentPath = event.path;
 } 
 } 
 
 toggleMultipleFileUpload() { 
 this.multipleFileUpload = !this.multipleFileUpload;
 return this.multipleFileUpload;
 } 
 
 toggleFolder() { 
 this.multipleFileUpload = false;
 this.folderUpload = !this.folderUpload; return this.folderUpload;
 } 
 
 toggleAcceptedFilesType() {
 this.acceptedFilesTypeShow = !this.acceptedFilesTypeShow;
 return this.acceptedFilesTypeShow;
 } 
 
 toggleVersioning() { 
 this.versioning = !this.versioning; return this.versioning;
 } 
 
 viewActivitiForm(event?: any) { 
 this.router.navigate(['/activiti/tasksnode', event.value.entry.id]);
 } 
} 

3.  Rebuild the project using the command “npm run build” from a command prompt.
4.  And start the app using “npm start command”.


In the login page, do not forget to disable the BPM toggle button.
Open URL.
Give appropriate credentials.


In case you are facing an issue, please feel free to comment on this BLOG and we will reply you at the earliest moment. Contact us Good luck!

Alfresco ECM

Alfresco

Alfresco vs. Traditional ECM: Why Modern Businesses Choose Alfresco

Alfresco offers modern businesses a flexible, scalable, and efficient alternative to traditional ECM systems. Explore why organizations are making the switch to better document management and collaboration.

Alfresco Development

Alfresco

Alfresco Development: How It Helps Businesses and Why It's Beneficial

Learn about Alfresco development and its benefits for businesses. Discover how leveraging Alfresco can enhance efficiency and collaboration.

Transform Your Business With Digital Enterprise Solutions

Contact us

Our Offices

INDIA AHMEDABAD, INDIA

401, One World West, Nr. Ambli T-Junction 200, S P Ring Road, Bopal, Ahmedabad, Gujarat 380058

UK
UK

Kemp House 160 City Road, London, United Kingdom EC1V 2NX

GERMANY GERMANY

Nürnberger Str. 46 90579 Langenzenn Deutschland

AUSTRALIA AUSTRALIA

Level 36 Riparian Plaza, 71 Eagle Street, Brisbane, QLD 4000

USA USA

4411 Suwanee Dam road, Bld. 300 Ste. 350 Suwanee GA, 30024

SOUTH AFRICA SOUTH AFRICA

Cube Work Space, 24 Hans Strijdom Avenue, Cape Town

UAE DUBAI, UAE

B 503 Sama Tower, Sheikh Zayed Road, United Arab Emirates

country-flag CANADA

34 Applegrove Ct. Brampton ON L6R 2Y8