This are the basic 'skeletons' of the common components. Please refer to the figma for style details.
"Params" mean data that is necessary for the component to render, whether that be from direct Inputs or by services, which could be accomplished via callbacks and/or observable ngrx actions and selectors.
"Events" are outputs that the parent component can listen to in order to respond to user interactions. These can be EventEmitter outputs or ngrx actions.
We should tend to prefer ngrx actions and selectors to inputs and outputs when we can, as it will help us keep the data flow predictable and less tightly coupled.
This is not an exhaustive list, we'll discover what we truly need as we go.
// data:
entitySummaryDetails: EntitySummaryDetails
// events:
- tab navigation events that will inform the parent component to change the index for what goes into the content slot
Here is just one example of the "multi-slot" projection from that article in a simplified version of the common composite dialog modal component that can be created using ng-content and content-projection. This has a title, content, and footer slot where content will be output like router-outlet. The dialog component has two buttons in the footer that emit events when clicked. The parent component listens to these events and logs a message to the console when the buttons are clicked.
ng-template and ngTemplateOutlet can also be used to project content for more dynamic scenarios.
Figma: https://www.figma.com/file/GaKw3nDscTnMEOzIf4CAa7/UpGrade-UI-Latest-14-(Final)?type=design&node-id=8289-13488&mode=design&t=pC7mrBmoUZsvCTYL-0
Common Components Track:
Common Components
This are the basic 'skeletons' of the common components. Please refer to the figma for style details.
"Params" mean data that is necessary for the component to render, whether that be from direct Inputs or by services, which could be accomplished via callbacks and/or observable ngrx actions and selectors.
"Events" are outputs that the parent component can listen to in order to respond to user interactions. These can be EventEmitter outputs or ngrx actions.
We should tend to prefer ngrx actions and selectors to inputs and outputs when we can, as it will help us keep the data flow predictable and less tightly coupled.
This is not an exhaustive list, we'll discover what we truly need as we go.
Common Root Page Component
Common Root Page Heading Component
Common Detail Page Component
Common Detail Page Heading Component
Common Details Page Overview Summary Card Component
Common Page Section Card List Component
Common Modal Component
Common Modal Footer Component
Action Buttons Slot [ Common Cancel Button | Common Primary Button ]
Common Modal Footer Cancel Button
Common Modal Footer Primary Button
ng Content-Projection Example
An angular article on a few ways to do content-projection: https://angular.io/guide/content-projection
Here is just one example of the "multi-slot" projection from that article in a simplified version of the common composite dialog modal component that can be created using
ng-content
and content-projection. This has a title, content, and footer slot where content will be output like router-outlet. The dialog component has two buttons in the footer that emit events when clicked. The parent component listens to these events and logs a message to the console when the buttons are clicked.ng-template
andngTemplateOutlet
can also be used to project content for more dynamic scenarios.