Lesson 4: Sculpting and Organizing your Application

In this Lesson, we will cover the following recipes:

  • Manually bootstrapping an application
  • Using safe $apply
  • Application file and module organization
  • Hiding AngularJS from the user
  • Managing application templates
  • The "Controller as" syntax

Introduction

In this Lesson, you will discover strategies to keep your application clean—visually, structurally, and organizationally.

Manually bootstrapping an application

When initializing an AngularJS application, very frequently you will allow the framework to do it transparently with the ng-app directive. When attached to a DOM node, the application will be automatically initialized upon the DOMContentLoaded event, or when the framework script is evaluated and the ...

Get AngularJS: Maintaining Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.