Base solution for your next web application

Activities of "rferrari"

Stupid injector lines inversion between $uibModal and $cookieStore... solved

appModule.controller('common.views.layout.header',
    [
        '$rootScope',
        '$scope',
        '$state',
        '$q',
        '$location',
        '$window',
        '$uibModal',
        '$cookieStore',
        'appSession',
        'appUserNotificationHelper',
        'abp.services.app.notification',
        'abp.services.app.userLink',
        'abp.services.app.project',
        function($rootScope,
            $scope,
            $state,
            $q,
            $location,
            $window,
            $cookieStore,
            $uibModal,
            appSession,
            appUserNotificationHelper,
            notificationService,
            userLinkService,
            projectService) {

OK do not waste your time on this request. The problem has disappeared both from local and web environments. I guess it was due to some browser cache issue...

Best regards

Hi

I am using Angular 1.x and Chrome. It is not happening only locally.

Regards

I can imagine! I am happy with the framework in any case

Have a good day

Perfect! It worked!

Now you could say why a language switch issue is under removing Front-End application. The point is that I realized that the language switch was poorly working only when I removed the front end!

You can then say that language switch is not so important in my solution if I realized it only for that. That it is true currently, but will not be the same shortly.

Anyway. It is really important to stay tuned on your changes! Sometimes I think of me as a lone developer, but with Abp I am really part of a development team! (Well in this conversation I was pretty alone, but I think this is because of the misleading subject, usually you reply so promptly)

Best regards

Hi after solving my issue as I said. I thought it is not true an MVC cannot manage a hash url. You do use mvc controller for profile image upload and I use them too in many cases. So I went to github and I discovered:

Fixed #1840: Language switch return url problem. - fixed 22 days ago

exactly on Abp.Web.Mvc.

[https://github.com/aspnetboilerplate/aspnetboilerplate/tree/dev/src/Abp.Web.Mvc/Web/Mvc/Controllers/Localization])

I am updating from 1.4.1 to 1.4.3 to see if now it works.

Best regards

Hi, well I did it myself

The original vm.changeLanguage in header.js used by SPA has a single instruction:

window.location.href = abp.appPath + 'AbpLocalization/ChangeCulture?cultureName=' 
                     + languageName + '&returnUrl=' + window.location.href;

for what I see AbpLocalization/ChangeCulture is an MVC controller in Abp.Web.Mvc and cannot work inside a SPA. Indeed the return URL is broken at the #.

I replaced it with the following, this changes the value of the language cookie and reload. As the previous does in MPA.

vm.changeLanguage = function (languageName) {
       document.cookie = "Abp.Localization.CultureName="+languageName;
       location.reload()
};

In this way I change language and remain on the page.

Best regards

This has nothing to do with removing front end application by the way

so the issue is that the vm.changeLanguage produce the right url:

/AbpLocalization/ChangeCulture?cultureName=it&returnUrl=http://localhost:6240/Application#/tenant/organizations

but the get request is truncated after the # sign:

http://localhost:6240/AbpLocalization/ChangeCulture?cultureName=en&returnUrl=http://localhost:6240/Application

this happens both in Chrome and Edge,

can you advise?

Thanks

Ok in reality vm.changeLanguage in header.js is producing the correct url:

/AbpLocalization/ChangeCulture?cultureName=it&returnUrl=http://localhost:6240/Application#/tenant/activities

I am missing something in my solution...

Showing 1 to 10 of 30 entries