akveo / blur-admin

AngularJS Bootstrap Admin Panel Framework
http://akveo.github.io/blur-admin/
Other
11.37k stars 3.09k forks source link

Page template is not rendering #414

Open mkj-git opened 6 years ago

mkj-git commented 6 years ago

I have this configuration in form.module.js


/**
 * @author v.lugovsky
 * created on 16.12.2015
 */
(function () {
  'use strict';

  angular.module('BlurAdmin.pages.form', ['ui.select', 'ngSanitize', 'textAngular'])
      .config(routeConfig);

  /** @ngInject */
  function routeConfig($provide, $stateProvider) {

    $provide.decorator('taOptions', ['taRegisterTool', '$delegate', function(taRegisterTool, taOptions) { // $delegate is the taOptions we are decorating

    taOptions.toolbar = [
        ['pre', 'quote','bold', 'italics', 'underline', 'strikeThrough', 'ul', 'ol', 'redo', 'undo', 'clear','justifyLeft', 'justifyCenter', 'justifyRight', 'indent', 'outdent', 'insertImage','insertLink', 'insertVideo'],
        []
    ];
        return taOptions;
    }]);

    $stateProvider
        .state('form', {
          url: '/form',
          template : '<ui-view autoscroll="true" autoscroll-body-top></ui-view>',
          abstract: true,
          title: 'Form Elements',
          sidebarMeta: {
            icon: 'ion-compose',
            order: 250,
          },
        })
        .state('form.campaigns', {
          url: '/campaigns',
          templateUrl: 'app/pages/form/campaigns/campaigns.html',
          title: 'Campaigns',
          controller: 'CampaignsCtrl',
          sidebarMeta: {
            order: 0,
          },
        })
        .state('form.campaigns.detail', {
          url: '/:label',
          // templateUrl: 'app/pages/form/campaigns/campaigns-details.html',
          templateUrl: 'app/pages/components/mail/detail/mailDetail.html',
          title: 'Campaign and Questions1',
          controller: "MailListCtrl",
          controllerAs: "listCtrl"
        })
        .state('form.campaigns.questions', {
          url: '/:label/:id',
          templateUrl: 'app/pages/form/campaigns/questions.html',
          title: 'Mail',
          controller: "CampaignsCtrl",
          // controllerAs: "detailCtrl"
        })
        .state('form.inputs', {
          url: '/inputs',
          templateUrl: 'app/pages/form/inputs/inputs.html',
          title: 'Form Inputs',
          sidebarMeta: {
            order: 100,
          },
        })
        .state('form.layouts', {
          url: '/layouts',
          templateUrl: 'app/pages/form/layouts/layouts.html',
          title: 'Form Layouts',
          sidebarMeta: {
            order: 200,
          },
        })
        .state('form.wizard',
        {
          url: '/wizard',
          templateUrl: 'app/pages/form/wizard/wizard.html',
          controller: 'WizardCtrl',
          controllerAs: 'vm',
          title: 'Form Wizard',
          sidebarMeta: {
            order: 300,
          },
        });
  }
})();

no in file campaigns.html i have a link like <p class="bold grey" ui-sref="form.campaigns.detail({id: '123', label: 'aaa'})">CLICK</p>.

Now when i am clicking 'CLICK' just the title of page is changing to Campaign and Questions1 but the template url is still the same i.e campaign.html instead of mailDetail.html