Answer the question
In order to leave comments, you need to log in
What to do with JS which is used in View in ZendFramework2?
There is the following View structure in the ZF2 module.
<div class="row">
<div class="col-md-7">
<table id="grid_customer"></table>
<div id="pager_customer"></div>
</div>
<div class="col-md-5">
<table id="grid_calls"></table>
<div id="pager_calls"></div>
</div>
</div>
<script type="text/javascript">
Использование JS для загрузки информации(ajax) и так далее,
который используется на этой странице.
</script>
Answer the question
In order to leave comments, you need to log in
It seems to me that this is not so scary: if this code is exclusively for this view, then you can leave it there, if it is possible to apply it in another view, then it is better to put it in a separate file and connect it in the desired view. If this code is used in many or all views, then it probably makes sense to include it in the parent view.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question