SlideShare a Scribd company logo
INTRO TO
UI-ROUTER +
TYPESCRIPT
Jamal O’Garro
Software Engineer
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
TALK I: UI-ROUTER
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
WHAT IS UI-ROUTER?
• Routing framework for AngularJS
• Fully replaces the default Angular router
• Created by AngularUI team (UI-Bootstrap, NG-Grid,
etc.)
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Multiple Views
• State Machine
• Nested Views
WHY USE UI-ROUTER?
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• (Old) Angular router only allowed single views
• Forced the use of partials to simulate multiple views
• UI-Router allows multiple views
• Each view can have it’s own controller
MULTIPLE VIEWS
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Uses state machine design pattern
• Routes are states and URLs are state properties
STATE MACHINE
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Provides more flexibility when building an app
• Allows for more modular code
• Helps you build apps quicker
NESTED VIEWS
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Must have a unique name
• Must have a template
• Controllers are optional
• URLs are optional
HOW DO WE DEFINE STATE?
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Directive that tells $state where templates go
• Renders the view associated with a given state
• Kind of like ng-view but not really . . .
UI-VIEW
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• binds anchor tag to a specific state
UI-SREF
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Parent state must exist
• No two states can have the same name
• When a child state is active so is the parent
• Child states load their templates into the paren’t ui-view
directive
• Inherit resolved dependencies and data properties
• Controllers, templates, URLs are not inherited
NESTED STATES
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
MULTIPLE NAMED VIEWS
• Views object - allows us to add several views,
templates and controllers to a given state
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
LET’S LOOK AT SOME CODE!
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
TALK II: TYPESCRIPT
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Superset of JavaScript
• JavaScript w/ Strong Typing + Other features
• Made by Microsoft
• Will be supported in Angular 2.0
WHAT IS TYPESCRIPT?
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
HOW DOES IT LOOK?
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
v
STRONG TYPING
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
v
CLASSES
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
v
INHERITANCE
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
v
MODULES
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
v
INTERFACES
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
v
• typescriptlang.org
• NPM install -g typescript
• Visual Studio / Webstorm / Sublime
HOW TO GET STARTED
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
• Gulp
• Official TypeScript Handbook
• Official TypeScript Tutorial
• TypeScript Playground
RESOURCES
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
THANK YOU!
Jamal O’Garro
Software Engineer
INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT

More Related Content

PDF
SF Cordova Meetup
PPTX
Why angular js Framework
PPTX
Angular - Beginner
PPTX
AngularJS - Architecture decisions in a large project 
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
PDF
Gettings started with the superheroic JavaScript library AngularJS
PPT
Coffee@DBG - Exploring Angular JS
PDF
The Art of AngularJS - DeRailed 2014
SF Cordova Meetup
Why angular js Framework
Angular - Beginner
AngularJS - Architecture decisions in a large project 
AngularJS - What is it & Why is it awesome ? (with demos)
Gettings started with the superheroic JavaScript library AngularJS
Coffee@DBG - Exploring Angular JS
The Art of AngularJS - DeRailed 2014

What's hot (20)

DOCX
Understanding angular js $rootscope and $scope
PPTX
AngularJS Best Practices
PDF
AngularJS application architecture
PPTX
Introduction to Angularjs
PDF
Introduction to AngularJS
PPTX
Angular js for beginners
PPTX
Up and Running with ReactJS
DOCX
multiple views and routing
PPTX
Step by Step - AngularJS
PDF
Angularjs architecture
PDF
AngularJS Basics
PDF
AngularJS Best Practices
PPTX
Angular JS - Introduction
PDF
React vs-angular-mobile
PDF
Introduction to AJAX In WordPress
PPTX
Angular js
PDF
Angular Classy
PPTX
AngularJS One Day Workshop
PDF
AngularJS with RequireJS
PDF
Angularjs - lazy loading techniques
Understanding angular js $rootscope and $scope
AngularJS Best Practices
AngularJS application architecture
Introduction to Angularjs
Introduction to AngularJS
Angular js for beginners
Up and Running with ReactJS
multiple views and routing
Step by Step - AngularJS
Angularjs architecture
AngularJS Basics
AngularJS Best Practices
Angular JS - Introduction
React vs-angular-mobile
Introduction to AJAX In WordPress
Angular js
Angular Classy
AngularJS One Day Workshop
AngularJS with RequireJS
Angularjs - lazy loading techniques
Ad

Similar to Intro to UI-Router/TypeScript (20)

PDF
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
PPTX
ngNewRouter
PDF
ngconf2015
PDF
Angular js routing options
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
PDF
The Angular road from 1.x to 2.0
PPT
AngularJS for Legacy Apps
PDF
Building Better Web Apps with Angular.js (SXSW 2014)
PDF
Mastering angular - Dot Net Tricks
PDF
Crash Course in AngularJS + Ionic (Deep dive)
PPTX
UI-Router
PDF
Building Better AngularJS 1.X Apps With TypeScript
PPTX
Migrating From Angular 1.x to Angular 2+
PPTX
Angular js
PDF
Architecture, Auth, and Routing with uiRouter
PDF
Deep Dive into AngularJS Javascript Framework
PDF
ITB2015 - Crash Course in Ionic + AngularJS
PPTX
UQ21CA642BA1-Unit-3-WAF-Class18-Introduction to Angular Routing.pptx
PPTX
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
PDF
Beyond AngularJS: Best practices and more
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
ngNewRouter
ngconf2015
Angular js routing options
AngularJS with TypeScript and Windows Azure Mobile Services
The Angular road from 1.x to 2.0
AngularJS for Legacy Apps
Building Better Web Apps with Angular.js (SXSW 2014)
Mastering angular - Dot Net Tricks
Crash Course in AngularJS + Ionic (Deep dive)
UI-Router
Building Better AngularJS 1.X Apps With TypeScript
Migrating From Angular 1.x to Angular 2+
Angular js
Architecture, Auth, and Routing with uiRouter
Deep Dive into AngularJS Javascript Framework
ITB2015 - Crash Course in Ionic + AngularJS
UQ21CA642BA1-Unit-3-WAF-Class18-Introduction to Angular Routing.pptx
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
Beyond AngularJS: Best practices and more
Ad

More from Jamal Sinclair O'Garro (15)

PDF
A Look at TensorFlow.js
PDF
Intro to React
PDF
React + Redux for Web Developers
PDF
Intro to ionic 2
PDF
Intro to ES6 / ES2015
PDF
The Ten Code Commandments
PDF
Using TypeScript with Angular
PDF
Intro to Node.js
PDF
Intro to iOS Development
PDF
Introduction to AngularJS
PDF
Intro to rails 2_kg_edited
PDF
Intro to Ruby on Rails
PDF
Intro to javascript (4 week)
PDF
Intro to HTML + CSS
PDF
Intro to Programming
A Look at TensorFlow.js
Intro to React
React + Redux for Web Developers
Intro to ionic 2
Intro to ES6 / ES2015
The Ten Code Commandments
Using TypeScript with Angular
Intro to Node.js
Intro to iOS Development
Introduction to AngularJS
Intro to rails 2_kg_edited
Intro to Ruby on Rails
Intro to javascript (4 week)
Intro to HTML + CSS
Intro to Programming

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
August Patch Tuesday
Machine Learning_overview_presentation.pptx
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
A comparative study of natural language inference in Swahili using monolingua...
Per capita expenditure prediction using model stacking based on satellite ima...
Heart disease approach using modified random forest and particle swarm optimi...
Programs and apps: productivity, graphics, security and other tools
gpt5_lecture_notes_comprehensive_20250812015547.pdf
cloud_computing_Infrastucture_as_cloud_p
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks
Univ-Connecticut-ChatGPT-Presentaion.pdf
A Presentation on Artificial Intelligence
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A comparative analysis of optical character recognition models for extracting...
TLE Review Electricity (Electricity).pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
SOPHOS-XG Firewall Administrator PPT.pptx
August Patch Tuesday

Intro to UI-Router/TypeScript

  • 1. INTRO TO UI-ROUTER + TYPESCRIPT Jamal O’Garro Software Engineer INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 2. TALK I: UI-ROUTER INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 3. WHAT IS UI-ROUTER? • Routing framework for AngularJS • Fully replaces the default Angular router • Created by AngularUI team (UI-Bootstrap, NG-Grid, etc.) INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 4. • Multiple Views • State Machine • Nested Views WHY USE UI-ROUTER? INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 5. • (Old) Angular router only allowed single views • Forced the use of partials to simulate multiple views • UI-Router allows multiple views • Each view can have it’s own controller MULTIPLE VIEWS INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 6. • Uses state machine design pattern • Routes are states and URLs are state properties STATE MACHINE INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 7. • Provides more flexibility when building an app • Allows for more modular code • Helps you build apps quicker NESTED VIEWS INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 8. • Must have a unique name • Must have a template • Controllers are optional • URLs are optional HOW DO WE DEFINE STATE? INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 9. • Directive that tells $state where templates go • Renders the view associated with a given state • Kind of like ng-view but not really . . . UI-VIEW INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 10. • binds anchor tag to a specific state UI-SREF INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 11. • Parent state must exist • No two states can have the same name • When a child state is active so is the parent • Child states load their templates into the paren’t ui-view directive • Inherit resolved dependencies and data properties • Controllers, templates, URLs are not inherited NESTED STATES INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 12. MULTIPLE NAMED VIEWS • Views object - allows us to add several views, templates and controllers to a given state INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 13. LET’S LOOK AT SOME CODE! INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 14. TALK II: TYPESCRIPT INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 15. • Superset of JavaScript • JavaScript w/ Strong Typing + Other features • Made by Microsoft • Will be supported in Angular 2.0 WHAT IS TYPESCRIPT? INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 16. HOW DOES IT LOOK? INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT v
  • 17. STRONG TYPING INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT v
  • 18. CLASSES INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT v
  • 19. INHERITANCE INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT v
  • 20. MODULES INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT v
  • 21. INTERFACES INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT v
  • 22. • typescriptlang.org • NPM install -g typescript • Visual Studio / Webstorm / Sublime HOW TO GET STARTED INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 23. • Gulp • Official TypeScript Handbook • Official TypeScript Tutorial • TypeScript Playground RESOURCES INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT
  • 24. THANK YOU! Jamal O’Garro Software Engineer INTRO TO ANGULAR UI-ROUTER + TYPESCRIPT