Hi Rob,

It took a little bit of set up but we did something like this:


   - In tapestry I created a component called "AngularComponent" that has a
   few <t:OutputRaw value="${message:vendorJs}"/>  lines in the .tml file
   (vendorJS and scriptJS) . Then I add <t:AngularComponent/> to any tapestry
   page where I want access to Angular.
   - I wrote all my angular bits as directives, using tapestry resteasy as
   a restapi. I also created an EmptyController. Then used <body
   ng-app="myAngularApp"
   ng-controller="EmptyController"><my-angular-directive/></body> in any
   tapestry tml file.
   - I had to put the app.properties file in my angular build and put the
   vendorJs=<script src="/scripts/vendor.js"></script> lines in there. Using
   Grunt for my Angular build process I had to add the .properties file so it
   would replace the vendor.js line in the app.properties file to the
   generated file names.
   - Each time we do a full build we have to run npm install and bower
   install. We also have a pom file in the angular project that runs grunt
   build and then creates a war file for the angular project.
   - We then use cargo-maven2-plugin to merge the tapestry and angular war
   files.

Hope that helps. If you want any specifics on any parts or why we did it in
a certain way let me know.

Regards,

Mark

On Wed, Dec 30, 2015 at 12:10 PM Robson Pires <orobsonpi...@gmail.com>
wrote:

> Hi,
>
> I am trying to integrate angularjs with tapestry, any advice about it?
>
> Bests regards,
>
> Rob
>

Reply via email to