Michal_Szulc
Michal_Szulc

Reputation: 4177

Create new page in angularjs blur-admin

According to the tutorial I've added new page and module, but it doesn't seem to work (neither it's shown in a sidebar, nor I can get it via direct url). What am I missing?

Upvotes: 3

Views: 1100

Answers (2)

user2129024
user2129024

Reputation: 471

after adding the module name to pages.module.js re run gulp serve:dist

Upvotes: 0

selftaught91
selftaught91

Reputation: 7481

Note the newPage that you have added has module name as BlurAdmin.pages.myNewPage and state as myNewPage as given in the code

(function () {
    'use strict';

    angular.module('BlurAdmin.pages.myNewPage', [])
    .config(routeConfig);
    /** @ngInject */
    function routeConfig($stateProvider) {
    $stateProvider
        .state('myNewPage', {
            url: '/myNewPage',
            templateUrl: 'app/pages/myNewPage/my-new-page.html',
            title: 'My New Page',
            sidebarMeta: {
                order: 800,
            },
        });
    }

})();

Now goto src/app/pages you will find pages.module.js. You should add mentioned new module to list:

angular.module('BlurAdmin.pages', [
    'ui.router',
    'BlurAdmin.pages.dashboard',
    'BlurAdmin.pages.ui',
    'BlurAdmin.pages.components',
    'BlurAdmin.pages.form',
    'BlurAdmin.pages.tables',
    'BlurAdmin.pages.charts',
    'BlurAdmin.pages.maps',
    'BlurAdmin.pages.profile',
    'BlurAdmin.pages.myNewPage'
])

And you are done.

Upvotes: 4

Related Questions