vendredi 7 août 2015

Single-page module for Yii2

What is the best way to create a single page module for Yii2?

For example using Ember, I will have index.html and assets folder to publish.

I see two ways, one would be to just put the application under web accessible folder, it will work fine. But what if i want to check access to the application using existing RBAC?

Another way would be to create a module and in default controller have something like

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

And load all assets with Asset Bundle.

The problem with this approach is that i will not know the folder where assets will be loaded (it can be solved with afterCopy callback or something, but all this doesn't look nice at all).

Please advise.




Aucun commentaire:

Enregistrer un commentaire