1

So I am planning out an app of moderate complexity using Angular for the frontend and Lithium for the backend. I'm full of questions at this point, but for this post I would like some ideas on templating. Both lithium and Angular have the capacity to handle the entire view layer, but I'd rather treat it like a single page app, so Angular will handle this.

Now how would I handle routes? Would Lithium basically be dumb of the current routes beyond the index? Should API endpoints have a special url scheme separate from the view URLs?

This is how I am thinking now::

theapp.com/dashboard/calendar/event/eventID :: for a view handled by Angular & theapp.com/api/event/eventID :: for an API endpoint

I'm quite new to building something this complex so please forgive me if this is a simple question. :)

Am I totally off the mark?

Askdesigners
  • 419
  • 5
  • 15

1 Answers1

4

This presentation should be helpful: http://li3-angular.lithium-framework.com/

What you're planning is the way to go: Li3 expose a json api, and Angular handles your routes and views. Your URL scheme should follow REST principles.

Mehdi Lahmam B.
  • 2,240
  • 16
  • 22
  • Great thanks! We'll look into this route. :) Good to know I have the right general idea about how a REST app should be structured. Not too bad for a designer :D. – Askdesigners Aug 21 '13 at 11:10
  • The presentation is no longer available at that URL but you can clone it here: https://github.com/nateabele/li3-angular-presentation – Nate Abele May 30 '14 at 16:12