Use data-* attribute in grails g.link generated in tagLib -


is there way use data- attributes in g.link generated taglib? want store dom info instead of using params in g.link results in query parameters.

example:

out << g.link(controller: "calendar", action: "info", params: [id: cal_id], data-info: "abc") { "click me " } 

unfortunately works when using normal g.link syntax view:

<g:link controller="calendar" action="info" id="${cal_id}" data-info="abc">click me</g:link> 

just put quotes around data attributes :

out << g.link(controller: "calendar", action: "info", params: [id: cal_id], "data-info": "abc") { "click me " } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -