cancel
Showing results for 
Search instead for 
Did you mean: 

sap-ui5 I want to be able to resuse a custom fragment in other UI5 apps also

0 Kudos

Hello experts

I have a few fragments with JS files as their controllers that I would like to reuse in all my apps.

An example of one of these would be our custom "upload attachment" fragment along with it's JS file as controller for the events. I would then like to include this fragment and JS in all my apps that requires documents to be uploaded.

What would be the best way to make these files global and how would I reference/include them in my projects/apps?

I have gone through many answers already available but i am not able to achieve the same.

If anyone has actually done it , please help me.

Thanks 🙂

Rashika Singhal

0 Kudos

Hi rashika,

Have you completed the above scenario . i have the same requirement so if you have done with the reuse component can you provide me any git link which helps me done the above scenario.
wish you reply me soon.

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
Active Contributor
0 Kudos

Hi rashika_singhal90,

You can create an independent component for "upload attachment" and reuse that component from other apps.

https://blogs.sap.com/2017/04/05/sapui5-how-to-reuse-parts-of-a-sapui5-application-in-othermultiple-...

https://sapui5.hana.ondemand.com/#/topic/346599f0890d4dfaaa11c6b4ffa96312

Regards,

Mio