Hi George,

I like to use a Tapestry page to bootstrap a AngularJs application. For
instance
https://github.com/ffacon/tapestry5-angular-demo/blob/master/src/main/java/dev/openshift/tapestry/angular/pages/Index.java
serve a RequireJS configuration file  and use page/ event to serve data to
the spa.

If you want you Tapestry to answer to GET Request send by AngularJS, you
just need need to do configure your httpProvider like this :
$httpProvider.defaults.headers.common["X-Requested-With"] =
'XMLHttpRequest';

I am not sure that using a RequireJS is the best way to bootstrap a
AngularJS app so if like me you prefer to use Tapestry Javascript Stack see
also https://github.com/ffacon/BookCat.

As suggested by Kalle, for POST and others HTTP verbs, I would use
tapestry-resteasy.

About Ember, I looking for an equivalent of
https://docs.angularjs.org/tutorial.

François

2015-08-07 22:18 GMT+02:00 Kalle Korhonen <kalle.o.korho...@gmail.com>:

> It's pretty easy. Don't build component event requests but just send
> REST(-like) requests that are either processed by plain Tapestry pages and
> its EventContext. If you are building a more comprehensive spa then
> consider pairing the client with JAX-WS resource backend (i.e.
> http://www.tynamo.org/tapestry-resteasy+guide/ for T5). Incidentally, I've
> been working with spas lately as well, and moved from AngularJS to Ember.
>
> Kalle
>
> On Fri, Aug 7, 2015 at 12:46 PM, Bob Harner <bobhar...@gmail.com> wrote:
>
> > Yes a page/event. As long as the URL looks like a tapestry event request,
> > you can handle the request in an event handler method within the page's
> > Java class, and return JSON.
> >
> > On Fri, Aug 7, 2015 at 2:40 PM, George Christman <
> gchrist...@cardaddy.com>
> > wrote:
> >
> > > Hi guys, I've been playing around with AngularJS and backbone recently
> > and
> > > I'm wondering if it's pretty easy to use with Tapestry? I'm more
> > concerned
> > > with ajax events etc. I know in grails you can just point your url to a
> > > controller/action, would we do something similar in Tapestry, but
> > obviously
> > > not a controller, but a page / event?
> > >
> >
>

Reply via email to