Angular - Routes and Forms
Angular - Routes and Forms In this course Angular - Routes and Forms , you will learn to manage dependencies of your class through Dependency Injection talk to servers through APIs build Single Page Apps using routers take user inputs through forms By the end of this course, you should be in a position to create your Single Page Application and interact with users and servers through forms and APIs. What Is Dependency Injection? When Object 'X' needs Object 'Y' to run, then Y is dependency of X or we can say in simple terms X is dependent on Y. Here in Angular, dependencies are defined as Services, which will be injected into those Objects which asks for it. Note: Services / Dependencies are always defined inside "constructor" of the class. Let us consider the following example: export class SmartPhone { constructor (bat: Battery, disp: Display){} } Here SmartPhone is dependent on Services, that supply power(Battery) and takes input and shows output(Displ...