php - Single-page module for Yii2 -


what best way create single page module yii2?

for example using ember, have index.html , assets folder publish.

i see 2 ways, 1 put application under web accessible folder, work fine. if want check access application using existing rbac?

another way create module , in default controller have like

return $this->renderfile('@path/to/index.html');

and load assets asset bundle.

the problem approach not know folder assets loaded (it can solved aftercopy callback or something, doesn't nice @ all).

please advise.

certainly personal choice technique, since control rbac manageable level action , not pose problem. once controller easy applicarre organization's access control using suitable configuration of access control filter.

alternatively, fact of creating module appropriately these purposes makes better organized and, precisely, modular, beyond greater complexity in creation of various parts in play (module, asset, cofig / main.php) yii2 handles , automatically assets , necessariio not know priori in name of folder finish specific assets (yii2 find need).

however if not 'module' reusable application characteristics opt first solution


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

php - How do you embed a video into a custom theme on WordPress? -