Exercise Monday

Goal: Take advantage of this time to thoroughly familiarize yourself with the TypeScript and Angular basics.

Warm Up

  • Is TypeScript JavaScript? Is JavaScript TypeScript? Explain the relationship between these two languages.
  • What are the benefits of using TypeScript over JavaScript?
  • Consider the following code snippet from this weekend's homework. Use it to answer the questions below:
class Task {
  done: boolean = false;
   constructor(public description: string, public priority: string){}  

var tasks: Task[] = [];
tasks.push(new Task('Do the dishes.', 'Medium'));
tasks.push(new Task('Buy chocolate.', 'Low'));
tasks.push(new Task('Do laundry.', 'High'));
  • Why is the done property of Task declared directly under the class declaration while the other properties (description, and priority) are only included in the constructor?
  • What does it mean when we declare the task array as the Task[] data type in the line var tasks: Task[] = [];? What type of information will this array contain?


TypeScript To Do List

Follow along with this weekend's TypeScript homework to create a To Do List application using TypeScript. Take your time here, and do not move onto the Angular lessons until you've fully completed the TypeScript version of the To Do List and feel comfortable working with TypeScript syntax.

Introduction to Angular

Carefully work through the lessons in tonight's homework.

Above all else, take your time, and ensure you understand each lesson's concepts before advancing to the next lesson. Any lessons you do not get to may be completed as homework tonight.

Peer Code Review

  • Application works as expected.
  • Components are used to create views and add behavior for your templates.
  • TypeScript is used throughout application, including defined data types.