Hi Sadha,
Gordon is right. ng-include creates a new scope. However, this is not where you problem is coming from. As Gordon pointed out you have 3 ng-controller=’pageController’.
This will get you 3 new controllers, all different from each other. If this is what you need, fine, but it will never give you what you need in this case.
I also fixed up your plunk to do what is expected. Its similar to that of Gordon, (I was away from my desk, and came back playing with your plunk, I just came back here and saw Gordon’s reply ;) )
this is what I have done, and why!
inp as an argument. This is important! ng-include creates its own new scope, and the function pushValue isinp (dot rule again..)Well, that’s about it I guess,
If you have further questions, don’t hesitate to ask!
Regards
Sander