0

I want to use different different types of template in client side and admin side using angular-fullstack.

Can you please let us know how i can achieve this. My routes look like Ex:

www.sitename.com - main site with theme1 (http://demo2.jlvextension.com/probusiness/)

www.sitename.com/administrator - administrator dashboard with theme2 (http://www.theme-guys.com/materialism/angular/)

krish007
  • 46
  • 9
  • [This](http://stackoverflow.com/questions/35337836/ui-router-structure-for-restricted-admin-panel) is also a good solution :) – Padi Jul 12 '16 at 09:37

3 Answers3

1

It seems to me like you're trying to create two very different front ends. I recommend building two different angular applications that utilize the same api's and domain. You could put an entire admin angular application at www.[sitename]/admin.

Gabriel Kunkel
  • 2,643
  • 5
  • 25
  • 47
0
  • you can resolve this problem with creating a directive with different templates,This plunker should demonstrate what needs to be done, but basically:(you should just change the value of isAdmin property to simulate ). good luck
aitnasser
  • 1,216
  • 1
  • 9
  • 23
0

We also had a requirement like this and initially we had both in one SPA, where we distinguished each page by URL. The URL 'admin/login' loaded admin login page while '/login' loaded the login page for others. The $routeProvider config is given below.

   $routeProvider.when("/admin/login", {
        templateUrl: "app/admin/login.html",
        controller: "AdminCtrl"
    }).
   when("/login", {
    templateUrl: "app/user/login.html",
    controller: "LoginCtrl"
}).

Later when the application became big and difficult to maintain, we ported the admin part to a separate application like Gabriel suggested above.

Dhanush Gopinath
  • 5,652
  • 6
  • 37
  • 68