- Reusing dumb (no data) html fragments in views?
You can use the {{include}} directive to include any view in any other view. If you have / views / snippets / my _snippet.html, just do:
{{include 'snippets/my_snippet.html'}}
- Reuse of the submenu that inherits the variables of the parent view so that they can be inserted without calling the controller functions and reloading the data?
The above considerations will have access to the variables returned by the controller, and to any variables defined in the parent view before inclusion (as well as global variables defined in the models, like any view).
source share