Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Dependency Injection

    • The built-in support for DI makes it easy to assemble a web application from smaller, thoroughly tested services
  • Two-way Data Binding

    • It makes it easy to change a value and effortlessly have it update the DOM. This means that there is only one place in your application where that piece of information is stored
  • Strong Focus on Testability

    • The design of the framework and the tooling around it promote testing practices at each stage of the development process.
  • Deep Linking

    • The framework makes it easy to share and change the application state. The URL of the application reflects what the user is doing.
  • Unique Templating System

    • It uses HTML as the templating language
    • It doesn't require an explicit DOM refresh, as AngularJS is capable of tracking user actions, browser events, and model changes to figure out when and which templates to refresh
    • It has a very interesting and extensible components subsystem, and it is possible to teach a browser how to interpret new HTML tags and attributes (Directives!!!)
      • You can create custom DOM elements, attributes, or classes that attach functionality that you define in JavaScript

Core concepts

Modules

Modules exist as containers that can provide configuration information, runtime dependencies, and other infrastructure support.

An Angular (main) "application" is just a module except...

  • it should know about all the other modules
  • it is the one identified by the ngApp directive

With Angular you can place all your controllers into a one module and all your services into a second module, or put the controllers and services all inside a single module

  • Advantages of using multiple modules in one app:
    • Keeps our global namespace clean
    • Eases writing tests as well as keeps them clean as easy to target isolated functionality
    • Eases to share code between applications
    • Allows different parts of the code to be loaded in any order

...