Show pop-ups the most elegant way
问题 I have this AngularJS app. Everything works just fine. Now I need to show different pop-ups when specific conditions become true, and I was wondering what would be the best way to proceed. Currently I’m evaluating two options, but I’m absolutely open to other options. Option 1 I could create the new HTML element for the pop-up, and append to the DOM directly from the controller. This will break the MVC design pattern. I’m not happy with this solution. Option 2 I could always insert the code