0

My question is mostly conceptual. I want to show an Ionic popup to user once user taps a button.

scenario:

  • inside a template, ng-click triggers the function to show the popup
  • where is the correct place to write the function that shows the popup. Inside the directives link function or controller?
Hakan
  • 1

1 Answers1

0

There are a lot of questions already answered here in StackOverflow that could help you.

Difference between the 'controller', 'link' and 'compile' functions when defining a directive

Angular directives - when and how to use compile, controller, pre-link and post-link

AngularJS : link vs compile vs controller

Basically you could define it in any of them, but take a look at the posts to learn a little bit more.

Community
  • 1
  • 1
Ignacio Villaverde
  • 1,264
  • 1
  • 11
  • 15