Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How to reuse one sling model into another in AEM SPA

Avatar

Level 7

I have written one Button SlingModel and I wanted to reuse it into another model. In SPA I can't achieve that. 
I tried with 

@Deleted Account
@getter
private ButtonModel buttonModel;

 

It is returning null. Is this possible?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Community Advisor

Hi 

 

Please try this  @ inject

 

refer this  : https://stackoverflow.com/questions/39594183/inject-another-sling-model-from-sling-model

 

Thanks

Avatar

Level 7

Tried this and it didn't work

Avatar

Correct answer by
Community Advisor