Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "dparizek"

Answer

The tutorial here:

<a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step">https://aspnetzero.com/Documents/Develo ... ep-By-Step</a>

has you do these steps:

  1. create child routes to tenant parent route in app.js.
$stateProvider.state('tenant', {
            'abstract': true,
            url: '/tenant',
            template: '<div ui-view class="fade-in-up"></div>'
        });

        $stateProvider.state('tenant.sop', {
            url: '/sop',
            templateUrl: '~/App/tenant/views/sop/index.cshtml'
        });
  1. Then under App/tenant/views you create a folder for index.js and index.cshtml.
<div ng-controller="tenant.views.sop.index as vm">
    <div class="row margin-bottom-5">
        <div class="col-xs-12">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>@L("Sop")</span>
                    </h1>
                </div>
            </div>
        </div>
    </div>
    <div class="portlet light">
        <div class="portlet-body">

            <p>SOP CONTENT COMES HERE!</p>

        </div>
    </div>
</div>
(function () {
    appModule.controller('tenant.views.sop.index', [
        '$scope',
        function ($scope) {
            var vm = this;

            $scope.$on('$viewContentLoaded', function () {
                Metronic.initAjax();
            });

            //...
        }
    ]);
})();
  1. You add entries for Localization to Core/Localization/MyProject/MyProject.xml.
<text name="Sop" value="SOP" />
  1. Also must add a constant entry to App_Start/Navigation/PageNames.cs. [this part seems not mentioned in tutorial]
public static class Tenant
            {
                public const string Dashboard = "Dashboard.Tenant";
                public const string QueryBuilder = "QueryBuilder.Tenant";
                public const string Demo = "Demo.Tenant";
                public const string Sop = "Sop.Tenant";
                public const string Social = "Social.Tenant";
                public const string Filer = "Filer.Tenant";
                public const string Settings = "Administration.Settings.Tenant";
            }

After all that I still get the error angular.js:13642 Error: Could not resolve 'tenant.sop' from state 'tenant.dashboard'

and I had this problem before but fixed it before. But I cannot remember how I fixed ): There needs to be yet one more entry somewhere but not remembering where.. or I am still missing something??? or ???...??? Ideas?

NEVERMIND - was browser caching (or maybe combo with clearing ABP caches) issue. Arrgh!

Showing 71 to 71 of 71 entries