Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Seth Warner
1,878 PointsIf you set up two scopes for the same controller inside the same view..
Would something like this work? I'm trying to get the anchor tag to show along with the html.
<div ng-controller="sameControllerName">
<a href="#" ng-click="!coverLetter = coverLetter"></a>
<p ng-bind-html ng-show="coverLetter" ></p>
</div>
<div ng-controller="sameControllerName">
<a href="http://www.google.com/" ng-show="coverLetter"> Google </a>
</div>
2 Answers

Steven Parker
225,712 PointsSure, that should work. But why not try a little experiment to test it for yourself?

Seth Warner
1,878 PointsSteven Parker You gave me an idea! Thank you, I just had to flip a few div's around in order to get it to work.
- Seth

Steven Parker
225,712 PointsExcellent. Glad it worked.
Seth Warner
1,878 PointsSeth Warner
1,878 PointsSteven Parker well I did, but for some reason It's not working. I just wanted to confirm it was okay to do that with controllers, another words it could technically work. Guess that means theres something with my Sass causing it to error out.
Steven Parker
225,712 PointsSteven Parker
225,712 PointsOops, I was just looking at the two ng-show's. I'm not sure about the two controller references.
Is there a larger container that holds both of these you could attach the controller to?