Skip to content Skip to sidebar Skip to footer

Angular Js Custom Domain Mapping

I want to give the users on my portal to have their domains mapped to their page and internal pages from their on. So, the user site url http://www.username.com should map to http

Solution 1:

Here is an example router setup with ui-router that could match what you are attempting:

// APPLICATION ROUTES
        // -----------------------------------
        // For any unmatched url, redirect to /app/
        $urlRouterProvider.otherwise("/login/signin");
        //
        // Set up the states
        $stateProvider.state('app', {
            url: "/app",
            templateUrl: "views/app.html",
            resolve: loadSequence('any library you want'),
            abstract: true
        }).state('app.page1', {
            url: "/page1",
            templateUrl: "views/page1.html",
            resolve: loadSequence('any library you want'),
            title: 'Dashboard'
        }).state('app.page1.section1', {
            url: '/page2',
            template: '<div ui-view class="fade-in-up"></div>',
            title: 'Page 2',
     });

Post a Comment for "Angular Js Custom Domain Mapping"