1

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://example.com/userid, similarly all the links inside should also map. Like, http://www.user-id.com/page1 => http://example.com/userid/page1 http://www.user-id.com/section1/page1 => http://example.com/userid/section1/page1

Has some body done this in angular js? I am using angular 1.3 and open to move to 1.4 or 1.5

1
  • Have you thought or tried with angular-route? Commented Mar 18, 2016 at 13:33

1 Answer 1

0

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',
     });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.