What are two ways to access the view model class in the template?

An Adobe Commerce developer is using a view model within an existing block:

What are two ways to access the view model class in the template? (Choose two.)
A . $block->getviewModel()
B. $block->getData( ‘ view_model ‘ )
C. $block->getData( ‘ viewModel ‘ )
D. $block->viewModel()

Answer: A B

Latest AD0-E710 Practice Questions with 94 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments