Upgrading to Angular 1.3+ Style

The first step of any migration is to upgrade the codebases style to conformto Angular 1.3+ style, ideally an Angular 1.5+ style. This means:

  • All controllers should be in controllerAs form, and ideally should only exist on directives
  • Use directives, specifically "component directives", that use the following properties:

    • restrict: 'E'
    • scope: {}
    • bindToController: {}
    • controllerAs
    • template or templateUrl
    • transclude (optional)
    • require (optional)
  • Component directives should not use the following attributes:

    • compile
    • replace: true
    • priority/terminal
  • Ideally have one component, or one thing per file
  • Ideally have folders organized by feature

原文: https://angular-2-training-book.rangle.io/handout/migrate/migration-prep/upgrade_to_angular_1_3.html