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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -