I just started to work with Angular, it's pretty nice to work with it, I just facing an issue of controllers's scope.
I have two files
1- header.html
2-dashboard.html
I included header.html in dashboard.html
I am performing two tasks with these files.
I have to use ng-click="viewAll()" which comes under CategoryCtlr controller in header.html, and after performing event I have to show the result in dashboard.html's element which is here
<div class="row articleAll"></div>
if I am using this element in header.html it's working fine but, not in dashboard.html
I inject ng-controller="CategoryCtlr" in both files.
Can anybody help me to handle this task,
It will be grateful for me.
Thank You
CategoryCtlrat multiple places, a new controller will be created evertime. Show some code. You have to look at scope inheritance and share services to share data.