0
let’s assume that my site made in Angularjs has a ng-include
from a modal (a floating part of the screen) I can define a controller in this HTML file to control the part that will be included even having a controller before include?
0
let’s assume that my site made in Angularjs has a ng-include
from a modal (a floating part of the screen) I can define a controller in this HTML file to control the part that will be included even having a controller before include?
0
For the specific modal, you can use the angular-ui-bootstrap (https://angular-ui.github.io/bootstrap/#! #modal), where you can call modals with templates and controllers you want.
For other templates, which are common in your application, I suggest creating directives (with your templates and controllers) and these autonomous in your operation.
Browser other questions tagged angularjs ng-controller
You are not signed in. Login or sign up in order to post.
Is there any reason to do this? I already think the person exaggerates in most solutions, it seems the exaggeration of exaggeration.
– Maniero
Leaving the entire code of a screen inside a single controller is not good for code readability and maintenance. I would prefer each sub-part of a screen to have its own controller, as well as+
– Isdeniel
What is not good for readability is to create a lot of controller. You need this?
– Maniero