0 votes
in Angular by

What is State function?

1 Answer

0 votes
by
Angular's state() function is used to define different states to call at the end of each transition. This function takes two arguments: a unique name like open or closed and a style() function.

For example, you can write a open state function

state('open', style({

  height: '300px',

  opacity: 0.5,

  backgroundColor: 'blue'

})),
...