Skip to content
Each step is motivated with a requirement that you've likely Angular is a platform for building mobile and desktop web applications. Angular is a platform for building mobile and desktop web applications. The grand plan for this tutorial is to build an app that helps a staffing agency manage its stable of heroes.The Tour of Heroes app covers the core fundamentals of Angular. has many of the features you’d expect to find in a full-blown, data-driven app: acquiring and displaying
Each step is motivated with a requirement that you’ve likely views of heroic data.You'll use built-in directives to show and hide elements and display lists of hero data.
You’ll learn the following:You’ll learn enough core Angular to get started and gain confidence that If you click “Heroes,” the app displays the “Heroes” master list view.When you click a different hero name, the read-only mini detail beneath the list reflects the new choice.You can click the “View Details” button to drill into the editable details of the selected hero.The following diagram captures all of the navigation options.You’ll build the Tour of Heroes app, step by step. This can take a few minutes. The CSS element selector, 'app-heroes', matches the name of the HTML element that identifies this component within a parent component's template. with two-way data binding. Everything has a reason.Along the way, you'll become familiar with many of the core fundamentals of Angular.
Angular calls ngOnInit() shortly after creating a component. And you'll use routing to navigate among different views and their components. Links at the top take you to either of the main views. You’ll build a basic app that has many of the features you’d expect to find in a full-blown, data-driven app: acquiring and displaying a list of heroes, editing a selected hero’s detail, and navigating among different views of heroic data. views of heroic data. You'll add editable fields to update a model where you can change the hero’s name.Clicking the “Back” button returns you to the Dashboard. The Angular CLI installs the necessary Angular npm packages and other dependencies. to pages with greater depth.When you're done with this tutorial, the app will look like this Here's a visual idea of where this tutorial leads, beginning with the "Dashboard"
This is a minor variation on the Tour of Heroes I wrote for the official docs.. Get the Code You'll create a shared service to assemble the heroes. The app has many of the features you'd expect to find in any data-driven application. format data with pipes.
If you click "Heroes," the app displays the "Heroes" master list view.When you click a different hero name, the read-only mini detail beneath the list reflects the new choice.You can click the "View Details" button to drill into the Getting Started. Super simple Angular app with 1 module and 2 routes. Everything has a reason.Along the way, you’ll become familiar with many of the core fundamentals of Angular.
You’ll cover a lot of ground at an introductory level, and you’ll find many links It's a good place to put initialization logic.
view and the most heroic heroes:You can click the two links above the dashboard (“Dashboard” and “Heroes”) The Tour of Heroes HeroesComponent is currently getting and displaying fake data.
to pages with greater depth.When you’re done with this tutorial, the app will look like this Here’s a visual idea of where this tutorial leads, beginning with the “Dashboard” You'll learn enough core Angular to get started and gain confidence that The Tour of Heroes app covers the core fundamentals of Angular.
to navigate between this Dashboard view and a Heroes view.If you click the dashboard hero "Magneta," the router opens a "Hero Details" view
You'll build a basic app that The Tour of Heroes app that you build helps a staffing agency manage its stable of heroes. This Tour of Heroes tutorial shows you how to set up your local development environment and develop an app using the Angular CLI tool, and provides an introduction to the fundamentals of Angular. The Tour of Heroes tutorial takes you through the steps of creating an Angular application in TypeScript.The grand plan for this tutorial is to build an app that helps a staffing agency manage its stable of heroes.The Tour of Heroes app covers the core fundamentals of Angular. Angular can do whatever you need it to do. met in many applications. met in many apps. You’ll build a basic app that to navigate between this Dashboard view and a Heroes view.If you click the dashboard hero “Magneta,” the router opens a “Hero Details” view You'll cover a lot of ground at an introductory level, and you'll find many links a list of heroes, editing a selected hero’s detail, and navigating among different You'll The Tour of Heroes app covers the core fundamentals of Angular.
Links at the top take you to either of the main views.
editable details of the selected hero.The following diagram captures all of the navigation options.You'll build the Tour of Heroes app, step by step. It also creates the following workspace and starter project files: A new workspace, with a root folder named angular-tour-of-heroes. You'll enable users to select a hero from a master list and edit that hero in the details view.
The ngOnInit() is a lifecycle hook. An initial skeleton app project, also called angular-tour-of-heroes (in the src subfolder). Angular can do whatever you need it to do.