Expose an Angular Component’s State to the Parent Component

Share this video with your friends

Send Tweet

Create a simple presentational component in Angular that encapsulates static view and logic decisions, but allows the parent component to set state with Inputs and listen to state changes with Outputs.

Björn Lindahl
Björn Lindahl
~ 6 years ago

I ran the code on https://github.com/eggheadio-projects/advanced-angular-component-patterns but fail to get the look of a slider on the toggle vide, as in the video. Is there something missing with the code?

Isaac Mann
Isaac Mann(instructor)
~ 6 years ago

Yep, it looks like they’re missing this line angular.json:

"styles": ["src/styles.css"],

Björn Lindahl
Björn Lindahl
~ 6 years ago

Yep, it looks like they’re missing this line angular.json: "styles": ["src/styles.css"],

That seemed to do the trick. Thanks!