Base solution for your next web application
Open Closed

AngularJs 1.x 4.1.0 question #3508


User avatar
0
dmali created

When I was upgrading my solution to version 4.1.0 I've noticed two things:

  • ScriptPaths.cs: path for angular javascript file is changed from "angular.min.js" to "angular.js". Is there any specific reason for this change?

  • Languages: new column "IsDisabled" is added, but I don't see any code changes to support this column. Are you planning to implement this in next release?

Kind regards


8 Answer(s)
  • User Avatar
    0
    moustafa created

    Hi

    • for your first question it's related to this issue [https://github.com/aspnetzero/aspnet-zero/issues/490])

    • for your second question it's related to this issue [https://github.com/aspnetzero/aspnet-zero/issues/461]) this feature already implemented in Angular 2 version and i don't think so they going to implement it in Angular 1.x version please refer to this post [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=9233])

    Regards

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks a lot @moustafa :)

  • User Avatar
    0
    dmali created

    Thank you.

    But i have another question .....

    Could you please tell me why is property "isDisabled" in "abp.localization.languages" set as string and not as boolean?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @dmali,

    I think this is a mistake, we will fix it for the next release of ABP.

    Thanks for reporting it.

  • User Avatar
    0
    dmali created

    Hi @ismcagdas,

    I'm very glad to hear that.

    While you are at it could you also check if it is possible to set a user UI language to default one if current user UI language is disabled?

    I have a situation where user UI language is set to "de" (value is stored in Abp.Localization.CultureName cookie) even if this language is disabled.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @dmali,

    We didn't implement IsDisabled in ABP actually. Because of that, if user can see a language which is disabled and tries to switch to that language, it works.

    So, you should hide disabled languages on UI.

  • User Avatar
    0
    dmali created

    Hi @ismcagdas,

    I'm not quite sure what you mean with "We didn't implement IsDisabled in ABP actually.", because you did implement this in ABP. This change came with v4.1.0.

    What you didn't do is the implementation in AngularJs 1.x (which you should btw).

    Because I think that this is a “MUST HAVE” of every system, I've implemented it on my own. So now only enabled languages are visible (frontend, login and backend) and admins can enable/disable languages as they want.

    But then I found out that the user can still see UI in a language which is disabled. And that is not what I understand as “IsDisabled”.

    Normally an entity (in this case language) is disabled for a reason. I think that if user still has this language stored in his cookie, it should be ignored and user should get UI in default language.

    Do you agree?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @dmali,

    I was talking about ABP Framework, not AspNet Zero. Yes, it is implemented in AspNet Zero v4.1 (in ASPNET Core version only).

    I agree with you but since this is a new feature, we didn't implement it in ASP.NET MVC 5.x version. Since you have the source code, you can also implement it on the server side. If you have any problems or questions while doing it, we can try to help you.

    Thanks.