I am trying to understand how naming works for parent/child objects in EmberJS.
Say I have 2 controllers as below;
// controllers/flash-messages.js
// controllers/posts/view.js
Now if I want to access "flash-messages" controller inside my "view" controller, I can just write the below in my controllers/posts/view.js
needs: ['flash-message'],
However, now assume I have one more controller as below (in sub-folder)
// controllers/posts/flash-messages.js
Now how do I distinguish between the 2 "flash-messages" controller ? Is there any way by which I can refer to each of them uniquely ?
Also does the same concept apply to models & routes ?
Aucun commentaire:
Enregistrer un commentaire