Build Angular app with Netlify function

Loading

Reading Time: 4 minutes Introduction I created a container component, FoodMenuComponent, to display a menu for users to order food and drink. There are several ways to create the menu data in JSON format: Hardcoded data in the component Create static JSON data in assets folder and use a service to retrieve the data for the component Design a … Read more

Angular and Storybook – Component with content projection

Loading

Reading Time: 3 minutes In Bonnie’s visual DOM course, I learnt the technique of applying multiple content projections in a component. I created a FoodMenuCardComponent with two content projections; i.e., a component with two <ng-content> elements. The first <ng-content> has selector ‘head’ that projects FoodQuestion component and the second <ng-content> has selector ‘body’ that projects a list of FoodChoice … Read more

Angular and Storybook – Simple Component with inputs and actions

Loading

Reading Time: 4 minutes Previously, I created a story book for simple component with inputs only (link) . In this post, I want to add new stories for a simple components with both input and action. The component is FoodChoiceComponent that has two states: choice available to order and choice that has sold out. If choice is available, user … Read more