Building "Large" AngularJS App: An Experience Report

At LiftOff LLC we have built more than a dozen AngularJS Apps, in this session.. we will share few tips / advice towards building clean / easy to refactor AngularJS Code.

2 favorite thumb_down thumb_up 1 comment visibility_off  Remove from Watchlist visibility  Add to Watchlist

Outline/structure of the Session

Code Organizing:

  • Organize the code into separate apps & setup required dependencies
  • Use module level folders
  • Create separate files for each directives
  • Specify module prefix, across the directives written

Communication between Controllers:

  • Define factory models & inject them across controllers
  • Let models handle the data & behaviour, avoid exposing the properties

Use of Directives:

  • Reserve all DOM manipulations only to directives, avoid putting them into Controllers
  • Help organise the code into re-usable modules
  • Use isolate scope, to help bring in context & get maximum reusability


  • Limited use of $broadcast
  • Prefer $scope.$digest over $scope.$apply
  • Clear the timeouts, when you don't need them
  • Prefer using "bind-once" strategy for things you know.. will NOT change, by either server side template or directives
  • Delete any unused data from memory (especially paginated data, if you are not showing previous page data)

Tools / Framework:

  • Protractor
  • Batarang

Learning Outcome

Write less & good code... that would also help you refactor easily. Learn the fundamentals of AngularJS

Target Audience


schedule Submitted 3 years ago

Comments Subscribe to Comments

comment Comment on this Submission
  • Naresh Jain
    By Naresh Jain  ~  3 years ago
    reply Reply

    Thanks Bhaskar. This looks like a very good proposal. Do you have any links to past video presentations?