ng-1, ng-2 side by side

JS
by jesse Spencer6 views·Updated Sep 14, 2016
Powered by AI

Need to present on this topic?

Create your own polished presentation in minutes. Just describe what you need.

Free to try, no credit card required

Transcript

ng-1, ng-2 side by side 9-13-2016

Feel free to Reach Out on Slack or Github!

The Upgrade Adapter

Part 2

Github

@jspenc72

Email

jesse@cindt.com

Making Angular 2 Dependencies Injectable to Angular 1

@jspenc72

downgrade to ng1

inject within ng1

ng2 service

The Upgrade Adapter

Part 1

The Upgrade "downgrade" Adapter Part 2

Making Angular 1 Dependencies Injectable to Angular 2

Using Angular 1 Component Directives from Angular 2 Code

upgrade the service by giving it the name of the service.

ng1 service

upgrade ng1 to ng2

ng1 injected in ng2

1. Preparation

The Upgrade "downgrade" Adapter Part 1

  • Following The Angular Style Guide
  • 1 Component per file
  • Folders-by-Feature Structure
  • Using Angular 2 Components from Angular 1 Code

2. Using a Module Loader

Downgrade ng2 to ng1

3. Migrate to TypeScript

Bootstrap Hybrid Angular

1+2 Applications

Using Component Directives

find . -name "*.js" -exec rename 's/.js$/*.ts/' {} \;

Angular 1.5

Browserify

System JS

Different parts of the application should reside in different directories and Angular modules.

Webpack