Join Justin Schwartzenberger for an in-depth discussion in this video Basics of TypeScript, part of Angular 2 Essential Training.
You'll be using TypeScript as you learn to write code for Angular. There's a very minimal learning curve to get to where you need to be in TypeScript, with the main focus being on writing classes, using decorators, and a bit of function parameter typing that you need to be familiar with. There are two benefits of going with TypeScript to write your angular code. The first is simplicity. By being able to write classes and use decorators you end up writing less code that reads cleaner and is easier to follow. The second is the Angular source code.
If you're writing your code in the same fashion as the angular source code, it'll be easy for you to look through the source code as you grow your Angular skills. The ability to reference and learn from the source code as you work on your angular projects will increase your productivity as well as your understanding of the framework. Using the same pattern of writing code, in this case TypeScript, will provide you an accelerated benefit in that area. Let's take a quick look at some code for an angular component, and highlight the parts that are TypeScript.
At the top of this code there's an import statement. This is some TypeScript syntax that will handle module loading. The @Component block of code is a TypeScript decorator. Below that there's a class definition. The class syntax is actually ES2015, but the export keyword is a TypeScript thing for turning the class into a module. Within the class there's a constructor function which is also an ES2015 thing, but the parameter it takes in has a colon and then a type behind it.
That is typescript syntax for strong typing a parameter. While these concepts seem complex now, they will make more sense as you progress through the course.
Justin Schwartzenberger steps through the framework one feature at a time, focusing on the new component-based architecture of Angular 2. You'll learn what Angular is and what it can do, as Justin builds a full-featured web app from start to finish. After mastering the essentials, you can tackle the other project-based courses in our library and create your own Angular app.
- What is Angular?
- Setting up an Angular template
- Creating a component
- Binding events and properties
- Getting data to components
- Using directives and pipes
- Creating Angular forms
- Validating form data
- Understanding dependency injection
- Providing services
- Making HTTP calls
Skill Level Intermediate
1. Architecture Overview
3. Directives and Pipes
5. Dependency Injection and Services
Router links2m 36s
Next steps1m 20s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.