SCOPE: {}

This is how the directive gets its isolated scope. We pass an object for the scope field in this case. This way, the scope of the directive is not inherited from the parent and is instead completely detached from it. Thus, the directive has an isolated scope.

There are 3 types of prefixes in AngularJS:

‘@’ – Text binding / one-way binding

‘=’ – Direct model binding / two-way binding

‘&’ – Behavior binding / Method binding

Your comment on this answer:

Your name to display (optional):

Email me at this address if a comment is added after mine:Email me if a comment is added after mine

Privacy: Your email address will only be used for sending these notifications.