Question: how to pass data from controller to directive?
Answer: In Below example “=” character with the object passed into the component property is a two-way binding approach which is used to pass data to the directive, as a result you can get data in $scope. component.