-
Notifications
You must be signed in to change notification settings - Fork 6
Upgrade from Angular 1.x to 2
Victor Dias edited this page Dec 12, 2016
·
5 revisions
- Seamless Ways to Upgrade Angular 1.x to Angular 2
- Incrementally upgrade an Angular 1 application to Angular 2.
- ANGULAR 1 TO 2 QUICK REFERENCE
- Migrating from Angular 1.x to Angular 2: Upgrade Strategies
- Introducing Angular Modules - Feature Modules
To be Angular 2 compatible, an Angular 1 component directive should configure these attributes:
-
restrict: 'E'
. Components are usually used as elements. -
scope: {}
- an isolate scope. In Angular 2, components are always isolated from their surroundings, and we should do this in Angular 1 too. -
bindToController: {}
. Component inputs and outputs should be bound to the controller instead of using the $scope. -
controller and controllerAs
. Components have their own controllers. template or templateUrl. Components have their own templates.
Component directives may also use the following attributes:
-
transclude: true
, if the component needs to transclude content from elsewhere. -
require
, if the component needs to communicate with some parent component's controller.