We often need to pass a parameter like an ID to a route and then access that ID in order to call an API to get some data. In this article, we'll look at how to define a route with a parameter, how to use params with the routerLink directive, and how to use the route snapshot to use a param in a component.
When we first create an Angular app with the Angular CLI, it gives us an option to add routing. Sometimes we don't know whether we want to add routing yet, so we say no. What do we do, though, if we decide to add routing later?
Finding your way from AngularJS to Angular can be really confusing. In this article, Sam Julien uncovers the different paths for migration and how to choose the one right for your company.
One of the things that drove me crazy when I was first learning RxJS in Angular was how difficult it seemed to reload a collection after I added or deleted an item. With promises, we could just use .then(), but what do we do with observables? In this lesson, I'm going to show you one way using RxJS Subjects.
When we first try to use a local server in development, we get a rude CORS error in the console and nothing works. This is because we're running the server and the client on different ports. We can fix this by setting up the Angular CLI to proxy requests to the API so they appear to be coming from the same origin.
Drop me a line below so I can send you the Tiny Experiments framework and worksheet. You'll also join over 2500 other devs and dev advocates on the Developer Microskills newsletter.