4
I’m studying Angular and I have a question. I’m creating an application, and wanted to organize the controllers by creating one for each view (template).
Exemplo:
Tela Cadastro - controller-cadastro.js
Tela Login - controller-cadastro.js
Tela Vídeos - controller-videos.js
Can I create a controller for each view? Is this logic correct? There is a smarter and more usual way for a controller to control a different view and keep the file structure split?
"I can create a controller for each view?" You can, you can create as many as you want. "This logic is correct?" What logic? This is a matter of organization, do it the best way for you. "There is a smarter and more usual way for a controller to control a different view and keep the file structure split?" I didn’t get that part.
– Jéf Bueno
@jbueno my question of summarized form is, if I could create the controllers in separate files
– Julio Rodrigues
You can, man. You can do whatever you want.
– Jéf Bueno