Now a days i’m using Angular JS for developing my site as web App, so to start a had decide to choose WordPress as Managing site content.
Deciding Architecture :
- Front end is built with AngularJS, with Twitter Boostrap CSS framwork
- Backend with wordpress and using WP-API plugin serves site content as json, which is then rendered by Angular.
To start Development i had tried ng-boilerplate as the basis of my project and stuck rigidly to its advises and integrating it with WordPress. Now heading into official Angular Seed project, it clear to me is how to decide directory/file structuring your application. However, rather than using above projects as-is, I was able to take certain aspects which are appropriate – e.g. the grouping of files by logical section and the general pattern of the build system etc,.
As learning experience with questions like:
- should this be module?
- should this be a factory or a service or a provider?
- do I need to use isolate scope of this directive?
- why does this need to be wrapped in a call to $apply()?
- where should I resolve this promise?
- is it a good idea to use $rootScope for this?
- etc ?
This leads to, Head in figuring out a proper ways. Here are some resources to learn angular JS,
Fetching Data : WP API
WP API is REST ful implementation which provides almost all WordPress content In JSON format by calling URL’s
But in some cases i need to extend this plugin to get some data which is not a generic.