0

I have an angular app which will display an image from an array for instance

images[$scope.activeIndex]

On the page is a link that will do a window open popup and on this popup page will be a next button. How does the child page affect the parent page. So the next button will call a function on the parent page which will increase the $scope.activeIndex by 1 and change some other scope values, which changes the image on the parent page

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
Richard Mc
  • 162
  • 1
  • 14

1 Answers1

0

Typically communication between controllers is done via events. See this SO question for more detail.

In general, the child controller fires an event on the button click then the parent controller handles the event.

Community
  • 1
  • 1
Vlad274
  • 6,514
  • 2
  • 32
  • 44