I am having a scenario in which i want to call a sling model with input parameter. For this i have a code like this
By design of the HTL/Sightly language, sending parameters is only possible for data-sly-use
(use objects initialization) and data-sly-call
(template calls). The reason for this is to separate business logic from the view.
As mentioned by @tomasz-szymulewski, since https://issues.apache.org/jira/browse/SLING-5812, there is support for passing request attributes on resource/script inclusion in the Sling/AEM implementation.