programListing.js What is the scope?

Can someone help me figure out the scope for this?

The code I have is below but I don’t believe it’s correct???

scope: {
  listing: '=',
},

From the subject :

“Use scope to specify that we’ll pass information into this directive through an attribute named listing”.

What you did would have been right if the subject was:
“Use scope to specify that we’ll pass listing into this directive through an attribute named listing”.

Good to know:

 scope: {
  a: '=b'
}

is like you said “I’m looking for attribute b, and i will save it in a”

Hope I could help

1 Like

I copied the same code but I am not able to view anything??

my code was just an example… Doesn’t fit with the subject.

var app = app.directive(“Directive”, function() {
return {
restrict : “E”,
scope: {
listing: “=”
},
template: “js/directives/programListing.html”
};
});