I have a bootstrap Angular2 modal error component that needs to trigger when the user tries to upload a file with erroneous content and i want the modal to open without needing a button to trigger the modal. Is there a way i can do this without having to use jquery? I need the modal to trigger on page load. I can have the button appear upon having an error but i need to bypass the need to click on a button. Any suggestions to achieve this without jquery would be greatly appreciated.
Asked
Active
Viewed 1,261 times
0
-
"I can have the button appear upon having an error but i need to bypass the need to click on a button." explain this more – this.girish May 10 '17 at 23:08
-
i have a function that checks for the errors and trigger the error component where the page loads but only showing the button as opposed to the pop up modal itself. i am trying to bypass the button altogether and have the modal open on page load. – Robel Tekeste May 11 '17 at 03:34
1 Answers
1
Take a look at Steve Paul's answer in this thread. Look how to make proper use of these modals in his plunkr from the thread. Whenever you want some popup to show, you have to call modal.show() (modal.hide() to hide)

Community
- 1
- 1

Tahniat Ashraf
- 1,020
- 2
- 12
- 21