Anton Kosykh
1 min readJul 26, 2017

--

A few thoughts about that

I think it will be better if you just set roles array and put available role names into that. It’s easier to check. Router example

And checking access in beforeEach

P.S. I also hate unnecessary nesting

And about folder structure. I use that

I have two different apps for admin and client here and common folder for common components/store modules/etc. You also can add a single entry point for that, just put your App.vue and main.js into the root folder.

But I think that client shouldn’t know what’s going in admin, and we just created two different apps.

--

--

Anton Kosykh
Anton Kosykh

Written by Anton Kosykh

— Stricty pants nerd that sounds like total dork (according to one of the readers) — Also YOLO JavaScript Engineer

Responses (3)