Playing with AngularJS

I decided to spend some time with AngularJS, because I’m really interested in its component-based approach.

Of course, this approach is also used by other frameworks (like ExtJS), but what differs the AngularJS framework from others is the fact that component layout is defined with HTML and all the code is contained within separate Javascript files (so designers could easily work with it).

With Angular, one could write his custom components that would be sticked into the application HTML tree using custom tags (<my_component></my_component>).

The AngularJS framework – during the initialization time – “expands” those tags to their real HTML counterparts (such as DIVs) and also sticks in the logic contained in Javascript files.

From what I’ve seen, AngularJS has really advanced concepts and a great future.

Yesterday I bumped into an assignment that one of the Croatian companies put online for applicants to solve.

The assignment was about writing an algorithm for filling the table (having a given number of rows and columns) with an incrementing list of integers. The order of table data should be spiral and clockwise, starting from the bottom-right cell.

It was an interesting problem, and I decided to solve it using the AngularJS framework.

Open the application

Source code | Gist

My algorithm also shown here.