Experiences Building a Website with AngularJS + WP API

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 :

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,.

The result is, the WordPress theme bundled with Twitter Bootstrap, Angular JS, Redux Option framework with LESS support, you can download it from github.

Code Standardize:

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,

Angular source code, Angular courses on Pluralsight, Ari Lerner’s ng-book, style guides of Todd Motto and John Papa, official Angular youtube channel  etc.

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s