SlideShare a Scribd company logo
Enterprise Software Development
Join the Conversation #AngularHackDay @jernej_kavka
Melbourne - Angular Hack Day 2019
An introduction to
Routing in Angular
Join the Conversation #AngularHackDay @jernej_kavka
Senior Software Architect at SSW
Jernej Kavka (JK)
@Jernej_kavka
https://github.com/jernejk
https://jkdev.me
https://opencollective.com/jernej-kavka
Focusing on .NET Core, Cognitive Services and ML.NET
Join the Conversation #AngularHackDay @jernej_kavka
Get started
Navigate with arguments
Navigate to a new page
Table of
Contents
Get started
• Create Angular application with routing
• Use ng new
• Angular CLI will ask you if you want routing
Join the Conversation #AngularHackDay @jernej_kavka
Add app-routing.module.ts in src folder
Manually enabling routing
Join the Conversation #AngularHackDay @jernej_kavka
Manually enabling routing
In app.module.ts, update as follows
Join the Conversation #AngularHackDay @jernej_kavka
Manually enabling routing
Lastly, in app.module.html, update as follows
Join the Conversation #AngularHackDay @jernej_kavka
Navigate to a new page
• Create new component
ng generate component Democracy
• Add a route in app-routing.module.ts
{ path: 'democracy', component: DemocracyComponent }
• Add a link in the menu in app.component.html
<a [routerLink]="'democracy'">Who will sit on Iron Throne?</a>
Join the Conversation #AngularHackDay @jernej_kavka
The Game of Thrones
Join the Conversation #AngularHackDay @jernej_kavka
?
Navigate with arguments
• Add routing to Iron Throne page
• { path: 'iron-throne/:id', component: IronThroneComponent }
• Add a link to Irone Throne page
• <a [routerLink]="['/iron-throne', character.id]">
• Get the character ID
• In constructor: private route: ActivatedRoute
• const id = this.route.snapshot.paramMap.get('id');
• Display the character as the rightful ruler
Join the Conversation #AngularHackDay @jernej_kavka
Other ways to navigate
• In HTML:
• <a [routerLink]="['/iron-throne', character.id]">
• In Code:
• In constructor: private router: Router
• this.router.navigate(['/iron-throne’, character.id]);
Join the Conversation #AngularHackDay @jernej_kavka
Learn more about Routing:
angular.io/guide/router
Thank you!
info@ssw.com.au
www.ssw.com.au
Sydney | Melbourne | Brisbane

More Related Content

What's hot

Deploying Apps Heroku
Deploying Apps HerokuDeploying Apps Heroku
Deploying Apps Heroku
Ajit N K
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
Tracy Lee
 
echo-o & Google App Engine dev - BarCamp Saigon 1
echo-o & Google App Engine dev - BarCamp Saigon 1echo-o & Google App Engine dev - BarCamp Saigon 1
echo-o & Google App Engine dev - BarCamp Saigon 1
huyzing
 
Devoxx be-2017-react-j hipster
Devoxx be-2017-react-j hipsterDevoxx be-2017-react-j hipster
Devoxx be-2017-react-j hipster
Sendil Kumar
 
Getting developers hooked on your api
Getting developers hooked on your apiGetting developers hooked on your api
Getting developers hooked on your api
Nicolas Garnier
 
apidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilioapidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilio
apidays
 
React Native
React NativeReact Native
Are you ready to adopt GraphQL?
Are you ready to adopt GraphQL?Are you ready to adopt GraphQL?
Are you ready to adopt GraphQL?
Siva Prasad Rao Janapati
 
Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...
Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...
Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...
Codemotion
 
Making share point rock with angular and react
Making share point rock with angular and reactMaking share point rock with angular and react
Making share point rock with angular and react
Joseph Jorden
 
API first approach for frontend developers
API first approach for frontend developersAPI first approach for frontend developers
API first approach for frontend developers
FDConf
 
Jenkins pipelines
Jenkins pipelinesJenkins pipelines
Jenkins pipelines
kraqa
 
Testing Your APIs: Postman, Newman, and Beyond
Testing Your APIs: Postman, Newman, and BeyondTesting Your APIs: Postman, Newman, and Beyond
Testing Your APIs: Postman, Newman, and Beyond
Postman
 
Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI
Loiane Groner
 
Hands on react native
Hands on react nativeHands on react native
Hands on react native
Jay Nagar
 
Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!
Abdelrahman Omran
 
Creating real time applications with Angular and Firebase
Creating real time applications with Angular and FirebaseCreating real time applications with Angular and Firebase
Creating real time applications with Angular and Firebase
Loiane Groner
 
API-first development
API-first developmentAPI-first development
API-first development
Vasco Veloso
 
Angular From The Trenches - 10 Lessons
Angular From The Trenches - 10 LessonsAngular From The Trenches - 10 Lessons
Angular From The Trenches - 10 Lessons
Duncan Hunter
 
WordPress + react
WordPress + reactWordPress + react
WordPress + react
Amit Rathi
 

What's hot (20)

Deploying Apps Heroku
Deploying Apps HerokuDeploying Apps Heroku
Deploying Apps Heroku
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
 
echo-o & Google App Engine dev - BarCamp Saigon 1
echo-o & Google App Engine dev - BarCamp Saigon 1echo-o & Google App Engine dev - BarCamp Saigon 1
echo-o & Google App Engine dev - BarCamp Saigon 1
 
Devoxx be-2017-react-j hipster
Devoxx be-2017-react-j hipsterDevoxx be-2017-react-j hipster
Devoxx be-2017-react-j hipster
 
Getting developers hooked on your api
Getting developers hooked on your apiGetting developers hooked on your api
Getting developers hooked on your api
 
apidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilioapidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Hong Kong 2021 - Better API DX with a CLI by Phil Nash, Twilio
 
React Native
React NativeReact Native
React Native
 
Are you ready to adopt GraphQL?
Are you ready to adopt GraphQL?Are you ready to adopt GraphQL?
Are you ready to adopt GraphQL?
 
Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...
Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...
Paco van Beckhoven - Keeping your head cool with a serverless voice controlle...
 
Making share point rock with angular and react
Making share point rock with angular and reactMaking share point rock with angular and react
Making share point rock with angular and react
 
API first approach for frontend developers
API first approach for frontend developersAPI first approach for frontend developers
API first approach for frontend developers
 
Jenkins pipelines
Jenkins pipelinesJenkins pipelines
Jenkins pipelines
 
Testing Your APIs: Postman, Newman, and Beyond
Testing Your APIs: Postman, Newman, and BeyondTesting Your APIs: Postman, Newman, and Beyond
Testing Your APIs: Postman, Newman, and Beyond
 
Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI Novidades Angular 4.x e CLI
Novidades Angular 4.x e CLI
 
Hands on react native
Hands on react nativeHands on react native
Hands on react native
 
Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!
 
Creating real time applications with Angular and Firebase
Creating real time applications with Angular and FirebaseCreating real time applications with Angular and Firebase
Creating real time applications with Angular and Firebase
 
API-first development
API-first developmentAPI-first development
API-first development
 
Angular From The Trenches - 10 Lessons
Angular From The Trenches - 10 LessonsAngular From The Trenches - 10 Lessons
Angular From The Trenches - 10 Lessons
 
WordPress + react
WordPress + reactWordPress + react
WordPress + react
 

Similar to Angular Routing - Angular Hack Day Melbourne 2019

Where and Why Use Angular for Web Development?
Where and Why Use Angular for Web Development?Where and Why Use Angular for Web Development?
Where and Why Use Angular for Web Development?
John Metthew
 
Java Desktop 2019
Java Desktop 2019Java Desktop 2019
Java Desktop 2019
Hendrik Ebbers
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Tracy Lee
 
.NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ...
.NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ....NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ...
.NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ...
NETFest
 
Net fest final presentation
Net fest final presentationNet fest final presentation
Net fest final presentation
Alexandre Malavasi
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
iFour Technolab Pvt. Ltd.
 
Crown Hill IT Solutions Build progressive web apps with angular.docx
Crown Hill IT Solutions Build progressive web apps with angular.docxCrown Hill IT Solutions Build progressive web apps with angular.docx
Crown Hill IT Solutions Build progressive web apps with angular.docx
Crown Hill IT Solutions
 
Angular Js Advantages - Complete Reference
Angular Js Advantages - Complete ReferenceAngular Js Advantages - Complete Reference
Angular Js Advantages - Complete Reference
EPAM Systems
 
What’s new in angular 13 and why should you use it for web app development pr...
What’s new in angular 13 and why should you use it for web app development pr...What’s new in angular 13 and why should you use it for web app development pr...
What’s new in angular 13 and why should you use it for web app development pr...
Moon Technolabs Pvt. Ltd.
 
The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024
The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024
The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024
Zestgeek Solutions
 
Beginner's Guide to Angular 2.0
Beginner's Guide to Angular 2.0Beginner's Guide to Angular 2.0
Beginner's Guide to Angular 2.0
All Things Open
 
Angular, the New Angular JS
Angular, the New Angular JSAngular, the New Angular JS
Angular, the New Angular JS
Kenzan
 
Angular & Webpack — Nir Kaufman
Angular & Webpack — Nir KaufmanAngular & Webpack — Nir Kaufman
Angular & Webpack — Nir Kaufman
500Tech
 
Webpack and angularjs
Webpack and angularjsWebpack and angularjs
Webpack and angularjs
Nir Kaufman
 
AngularJS Training in Noida
AngularJS Training in NoidaAngularJS Training in Noida
AngularJS Training in Noida
Raj Sharma
 
Top Reasons to use the Angular Framework for developing Applications!
Top Reasons to use the Angular Framework for developing Applications!Top Reasons to use the Angular Framework for developing Applications!
Top Reasons to use the Angular Framework for developing Applications!
Shelly Megan
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
Henry Tao
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Subba Tanniru
 
React or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework DevelopmentReact or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework Development
Darin Dickey
 
Kabanero
KabaneroKabanero

Similar to Angular Routing - Angular Hack Day Melbourne 2019 (20)

Where and Why Use Angular for Web Development?
Where and Why Use Angular for Web Development?Where and Why Use Angular for Web Development?
Where and Why Use Angular for Web Development?
 
Java Desktop 2019
Java Desktop 2019Java Desktop 2019
Java Desktop 2019
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
 
.NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ...
.NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ....NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ...
.NET Fest 2019. Alexandre Malavasi. The future of Web: what Microsoft Blazor ...
 
Net fest final presentation
Net fest final presentationNet fest final presentation
Net fest final presentation
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
 
Crown Hill IT Solutions Build progressive web apps with angular.docx
Crown Hill IT Solutions Build progressive web apps with angular.docxCrown Hill IT Solutions Build progressive web apps with angular.docx
Crown Hill IT Solutions Build progressive web apps with angular.docx
 
Angular Js Advantages - Complete Reference
Angular Js Advantages - Complete ReferenceAngular Js Advantages - Complete Reference
Angular Js Advantages - Complete Reference
 
What’s new in angular 13 and why should you use it for web app development pr...
What’s new in angular 13 and why should you use it for web app development pr...What’s new in angular 13 and why should you use it for web app development pr...
What’s new in angular 13 and why should you use it for web app development pr...
 
The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024
The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024
The Power of Angular: 10 Reasons Why Web Developers Should Embrace It in 2024
 
Beginner's Guide to Angular 2.0
Beginner's Guide to Angular 2.0Beginner's Guide to Angular 2.0
Beginner's Guide to Angular 2.0
 
Angular, the New Angular JS
Angular, the New Angular JSAngular, the New Angular JS
Angular, the New Angular JS
 
Angular & Webpack — Nir Kaufman
Angular & Webpack — Nir KaufmanAngular & Webpack — Nir Kaufman
Angular & Webpack — Nir Kaufman
 
Webpack and angularjs
Webpack and angularjsWebpack and angularjs
Webpack and angularjs
 
AngularJS Training in Noida
AngularJS Training in NoidaAngularJS Training in Noida
AngularJS Training in Noida
 
Top Reasons to use the Angular Framework for developing Applications!
Top Reasons to use the Angular Framework for developing Applications!Top Reasons to use the Angular Framework for developing Applications!
Top Reasons to use the Angular Framework for developing Applications!
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
React or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework DevelopmentReact or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework Development
 
Kabanero
KabaneroKabanero
Kabanero
 

Recently uploaded

Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
OECD Directorate for Financial and Enterprise Affairs
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
1990 Media
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
ToshihiroIto4
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
gpww3sf4
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
samililja
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
SkillCertProExams
 
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussionArtificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
OECD Directorate for Financial and Enterprise Affairs
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
artemacademy2
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 

Recently uploaded (20)

Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
 
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
 
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussionArtificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 

Angular Routing - Angular Hack Day Melbourne 2019

  • 1. Enterprise Software Development Join the Conversation #AngularHackDay @jernej_kavka
  • 2. Melbourne - Angular Hack Day 2019 An introduction to Routing in Angular Join the Conversation #AngularHackDay @jernej_kavka
  • 3. Senior Software Architect at SSW Jernej Kavka (JK) @Jernej_kavka https://github.com/jernejk https://jkdev.me https://opencollective.com/jernej-kavka Focusing on .NET Core, Cognitive Services and ML.NET Join the Conversation #AngularHackDay @jernej_kavka
  • 4. Get started Navigate with arguments Navigate to a new page Table of Contents
  • 5. Get started • Create Angular application with routing • Use ng new • Angular CLI will ask you if you want routing Join the Conversation #AngularHackDay @jernej_kavka
  • 6. Add app-routing.module.ts in src folder Manually enabling routing Join the Conversation #AngularHackDay @jernej_kavka
  • 7. Manually enabling routing In app.module.ts, update as follows Join the Conversation #AngularHackDay @jernej_kavka
  • 8. Manually enabling routing Lastly, in app.module.html, update as follows Join the Conversation #AngularHackDay @jernej_kavka
  • 9. Navigate to a new page • Create new component ng generate component Democracy • Add a route in app-routing.module.ts { path: 'democracy', component: DemocracyComponent } • Add a link in the menu in app.component.html <a [routerLink]="'democracy'">Who will sit on Iron Throne?</a> Join the Conversation #AngularHackDay @jernej_kavka
  • 10. The Game of Thrones Join the Conversation #AngularHackDay @jernej_kavka ?
  • 11. Navigate with arguments • Add routing to Iron Throne page • { path: 'iron-throne/:id', component: IronThroneComponent } • Add a link to Irone Throne page • <a [routerLink]="['/iron-throne', character.id]"> • Get the character ID • In constructor: private route: ActivatedRoute • const id = this.route.snapshot.paramMap.get('id'); • Display the character as the rightful ruler Join the Conversation #AngularHackDay @jernej_kavka
  • 12. Other ways to navigate • In HTML: • <a [routerLink]="['/iron-throne', character.id]"> • In Code: • In constructor: private router: Router • this.router.navigate(['/iron-throne’, character.id]); Join the Conversation #AngularHackDay @jernej_kavka
  • 13. Learn more about Routing: angular.io/guide/router