SlideShare a Scribd company logo
ANGULAR 2.0 WITH
TYPESCRIPT
Atlanta JavaScript Meetup
Jeremy Likness – Director App Dev, iVision http://bit.ly/ivisionappdev
@JeremyLikness | http://bit.ly/coderblog | https://github.com/JeremyLikness
ABOUT IVISION
• Local company (right across the street)
• Engineering Support
• Cloud Services
• Technology Consulting
• Product Resale
• Application Development: http://bit.ly/ivisionappdev
• Data Management (SQL, NoSQL, REDIS, etc.)
• Business Intelligence
• Collaboration
• Enterprise App Development (Mobile, web, desktop)
AGENDA
• Angular 2.0 Kickstart
• Why Angular?
• Angular 1.0 vs. 2.0
• Tools of the Trade
• Hands-on
• Q&A
X-PLATFORM TOOLS
KICKSTART
npm install -g angular-cli
ng new my-project
cd my-project
ng serve
WHY ANGULAR?
• Three D’s of Web Development: http://bit.ly/3dofweb
• Declarative vs. Imperative
• Data-binding
• Dependency Injection
• Components and Templates
• Code Reuse
• Parallel Development
• Testability
• Performance
Source: http://stackoverflow.com/research/developer-survey-2016
WHY ANGULAR 2?
• Small footprint (45k – smaller than Angular 1.x)
• Easy to read, understand, and learn declarative interface
• Improved performance (5x rendering in all scenarios over Angular 1.x)
• Great CSS management (CSS per component)
• Module prefixing (easier to move related files in large projects)
• Server-side rendering with Angular universal
• Testing support
• Advanced scaffolding with Angular-CLI
• TypeScript (stay tuned…)
WHY TYPESCRIPT?
• “I cannot say I have ever been a Microsoft fan but TypeScript has ‘softened’ me, it is
easily one of the best web technologies to arrive in the past 3 years.” -
https://tedpatrick.com/2013/06/25/7-months-with-typescript/
• “Overall, TypeScript is wonderful to work with. It helps developers catch errors
quickly, adds types and type-checking, and documents your progress so that if
someone else wants to contribute, or you need to return to your work months later,
you can easily pick up where you left off.” - http://www.livetiles.nyc/blog/typescript-a-digital-workplace-
success-story/
• “… we use TypeScript not because we’re part of Microsoft, but because we find
tremendous value by improving our productivity and keeping our quality high which
together allow us to move much faster.” - https://medium.com/@delveeng/why-we-love-typescript-
bec2df88d6c2#.pzp9xp7an
WHY TYPESCRIPT?
http://bit.ly/typescriptvid
“OUT OF THE BOX”
ng serve
ng test
ng e2e
NG WALKTHROUGH
ng g service application
// view models -> components
// service (app service)
// local variables #color myColor
// bindings [innerText] [style.color] [innerHTML]
// events (change)="…"
// CSS
// forms <form> ngControl ngForm (valid, dirty)
EXTENDING YOUR NG-APP
ng g component tile
ng g route mark-down
// routerLink
// adding a module
npm i –save showdown
EXTENDING YOUR NG-APP
angular-cli-build.js
// path/pattern to deployment assets
'showdown/dist/showdown.js',
EXTENDING YOUR NG-APP
system.config.ts
// Map relative paths to URLs.
'showdown': './vendor/showdown/dist/';
// Module configuration (packages)
{ 'showdown' :
{ main: 'showdown.js', // what loads
format: 'global' // <<ambient>>
}
};
EXTENDING YOUR NG-APP
Your-Code.ts
import 'showdown';
import { Http, HTTP_PROVIDERS } from '@angular/http';
import 'rxjs/Rx';
// import {x} from 'path/path'
// this is only needed if you do not have typings
declare var showdown: any;
QUESTIONS?
Atlanta JavaScript Meetup
Jeremy Likness – Director App Dev, iVision http://bit.ly/ivisionappdev
@JeremyLikness | http://bit.ly/coderblog | https://github.com/JeremyLikness

More Related Content

PPTX
Back to the ng2 Future
PPTX
Angle Forward with TypeScript
PPTX
Angular from a Different Angle
PPTX
Single Page Applications: Your Browser is the OS!
PPTX
Let's Build an Angular App!
PPTX
Windows 8.1 Sockets
PPTX
My XML is Alive! An Intro to XAML
PPTX
C# Async/Await Explained
Back to the ng2 Future
Angle Forward with TypeScript
Angular from a Different Angle
Single Page Applications: Your Browser is the OS!
Let's Build an Angular App!
Windows 8.1 Sockets
My XML is Alive! An Intro to XAML
C# Async/Await Explained

Recently uploaded (20)

DOCX
FIFA World Cup Semi Final: Lionel Messi one win from crowning glory after Arg...
DOC
Bishop's毕业证学历认证,维耶蒙特利尔学校毕业证毕业证文凭
PDF
FIFA World Cup Scaloni Hopeful for Messi’s FIFA World Cup 2026 Participation.pdf
DOCX
MetLife Stadium Seeks Volunteers for FIFA 2026, Including the Final Match.docx
PPTX
sports performance data analysics for sports
PDF
Best All-Access Digital Pass me .... pdf
PDF
Visual Performance Enhancement in Sports Optometry
DOCX
NFL Dublin Labriola on Steelers’ Victory Over the Jaguars.docx
DOCX
NFL Dublin Rondale Moore’s Comeback Ends in Heartbreak.docx
DOCX
NFL London Jets QB Room Dealing with Multiple Injuries.docx
DOCX
FIFA World Cup Semi Final The Battle for Global Supremacy.docx
DOCX
NFL Dublin Addison Returns Home To Haunt Pittsburgh.docx
DOCX
North Texas announced as base camps for 2026 FIFA World Cup.docx
PDF
volleyball lesson.powerpoint presentation
PPT
Aboriginals Achievements in Society and Community Development
DOCX
FA Cup Final 2026 Siring: Arne Slot Crit
PDF
Download GTA 5 For PC (Windows 7, 10, 11)
PPTX
ttttttttttttttttttttttttarget games.pptx
DOCX
NFL Dublin Injury Ends Season for Former Vikings Standout.docx
PPTX
Sports Writing by SHS Teacher Roel A. Naza
FIFA World Cup Semi Final: Lionel Messi one win from crowning glory after Arg...
Bishop's毕业证学历认证,维耶蒙特利尔学校毕业证毕业证文凭
FIFA World Cup Scaloni Hopeful for Messi’s FIFA World Cup 2026 Participation.pdf
MetLife Stadium Seeks Volunteers for FIFA 2026, Including the Final Match.docx
sports performance data analysics for sports
Best All-Access Digital Pass me .... pdf
Visual Performance Enhancement in Sports Optometry
NFL Dublin Labriola on Steelers’ Victory Over the Jaguars.docx
NFL Dublin Rondale Moore’s Comeback Ends in Heartbreak.docx
NFL London Jets QB Room Dealing with Multiple Injuries.docx
FIFA World Cup Semi Final The Battle for Global Supremacy.docx
NFL Dublin Addison Returns Home To Haunt Pittsburgh.docx
North Texas announced as base camps for 2026 FIFA World Cup.docx
volleyball lesson.powerpoint presentation
Aboriginals Achievements in Society and Community Development
FA Cup Final 2026 Siring: Arne Slot Crit
Download GTA 5 For PC (Windows 7, 10, 11)
ttttttttttttttttttttttttarget games.pptx
NFL Dublin Injury Ends Season for Former Vikings Standout.docx
Sports Writing by SHS Teacher Roel A. Naza

The Angular-CLI for Angular 2 and TypeScript

  • 1. ANGULAR 2.0 WITH TYPESCRIPT Atlanta JavaScript Meetup Jeremy Likness – Director App Dev, iVision http://bit.ly/ivisionappdev @JeremyLikness | http://bit.ly/coderblog | https://github.com/JeremyLikness
  • 2. ABOUT IVISION • Local company (right across the street) • Engineering Support • Cloud Services • Technology Consulting • Product Resale • Application Development: http://bit.ly/ivisionappdev • Data Management (SQL, NoSQL, REDIS, etc.) • Business Intelligence • Collaboration • Enterprise App Development (Mobile, web, desktop)
  • 3. AGENDA • Angular 2.0 Kickstart • Why Angular? • Angular 1.0 vs. 2.0 • Tools of the Trade • Hands-on • Q&A
  • 5. KICKSTART npm install -g angular-cli ng new my-project cd my-project ng serve
  • 6. WHY ANGULAR? • Three D’s of Web Development: http://bit.ly/3dofweb • Declarative vs. Imperative • Data-binding • Dependency Injection • Components and Templates • Code Reuse • Parallel Development • Testability • Performance Source: http://stackoverflow.com/research/developer-survey-2016
  • 7. WHY ANGULAR 2? • Small footprint (45k – smaller than Angular 1.x) • Easy to read, understand, and learn declarative interface • Improved performance (5x rendering in all scenarios over Angular 1.x) • Great CSS management (CSS per component) • Module prefixing (easier to move related files in large projects) • Server-side rendering with Angular universal • Testing support • Advanced scaffolding with Angular-CLI • TypeScript (stay tuned…)
  • 8. WHY TYPESCRIPT? • “I cannot say I have ever been a Microsoft fan but TypeScript has ‘softened’ me, it is easily one of the best web technologies to arrive in the past 3 years.” - https://tedpatrick.com/2013/06/25/7-months-with-typescript/ • “Overall, TypeScript is wonderful to work with. It helps developers catch errors quickly, adds types and type-checking, and documents your progress so that if someone else wants to contribute, or you need to return to your work months later, you can easily pick up where you left off.” - http://www.livetiles.nyc/blog/typescript-a-digital-workplace- success-story/ • “… we use TypeScript not because we’re part of Microsoft, but because we find tremendous value by improving our productivity and keeping our quality high which together allow us to move much faster.” - https://medium.com/@delveeng/why-we-love-typescript- bec2df88d6c2#.pzp9xp7an
  • 10. “OUT OF THE BOX” ng serve ng test ng e2e
  • 11. NG WALKTHROUGH ng g service application // view models -> components // service (app service) // local variables #color myColor // bindings [innerText] [style.color] [innerHTML] // events (change)="…" // CSS // forms <form> ngControl ngForm (valid, dirty)
  • 12. EXTENDING YOUR NG-APP ng g component tile ng g route mark-down // routerLink // adding a module npm i –save showdown
  • 13. EXTENDING YOUR NG-APP angular-cli-build.js // path/pattern to deployment assets 'showdown/dist/showdown.js',
  • 14. EXTENDING YOUR NG-APP system.config.ts // Map relative paths to URLs. 'showdown': './vendor/showdown/dist/'; // Module configuration (packages) { 'showdown' : { main: 'showdown.js', // what loads format: 'global' // <<ambient>> } };
  • 15. EXTENDING YOUR NG-APP Your-Code.ts import 'showdown'; import { Http, HTTP_PROVIDERS } from '@angular/http'; import 'rxjs/Rx'; // import {x} from 'path/path' // this is only needed if you do not have typings declare var showdown: any;
  • 16. QUESTIONS? Atlanta JavaScript Meetup Jeremy Likness – Director App Dev, iVision http://bit.ly/ivisionappdev @JeremyLikness | http://bit.ly/coderblog | https://github.com/JeremyLikness