Integrating AngularJS app with Java Tapestry platform- Tapestry throwing mark-up errors

StackOverflow https://stackoverflow.com/questions/21410350

  •  03-10-2022
  •  | 
  •  

I've written a stand-alone AngularJS app, and am now attempting to integrate it into a Java Tapestry framework. Loading all the JS is working fine (printed "AngularJS running" to console from controller to confirm), but I run into problems once I introduce my mark-up. I am getting Tapestry mark-up errors that make me unable to load the page, for example:

"Failure parsing template classpath:path/to/my/app/TableViewBrowser.tml: Attribute name "tooltip" associated with an element type "p" must be followed by the ' = ' character."

What it's objecting to is mark-up like this:

 <p ng-class="{checked: case.beratungsanlass}" tooltip>{{ case.beratungsanlass }}</p>

I already went through and replaced all the in-line conditional statements with function calls, because it didn't like less-than or equal-than signs in the mark-up either, but I wonder if I'm not better off figuring out a way to instruct Tapestry to ignore this mark-up, rather than rewriting my entire app mark-up.

Has anyone done this before? Which would be the better option: rewriting the Angular mark-up so that it conforms to the standards Tapestry is using, or instructing Tapestry to ignore portions of the mark-up? And if the latter, how can I do this?

有帮助吗?

解决方案

Tapestry requires that templates are properly formed XML. You'll need to do something like:

<p ng-class="{checked: case.beratungsanlass}" tooltip="true">{{ case.beratungsanlass }}</p>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top