Base solution for your next web application

Activities of "shridhar.mole"

  • 10.2
  • Angular
  • .net core

In default implementation of createOrUpdateUser api , we are throwing userFriendly exception if users count excced MaxUserCount Feature . So I want to change the messageBox which shown on throwing this userFriendly exception, I want to show confirm messageBox which shows message "User count exceeds, If you want to upgrade click Yes". And when user clicks Yes button then I want to do some work. How can I achieve this.

  • 10.2
  • Angular
  • .net core

I want to show warning message on TenantSettings page, when user change some of the settings and forgot to save and when he try to redirect any where else then I want to warn user that "There are changes you have made to the page. If you quit, you will lose your changes." something like that.

So for above task I did changes below :

export class AccountRouteGuard implements CanActivate, CanDeactivate<CheckUnsavedComponent> {

    constructor(
        private _permissionChecker: PermissionCheckerService,
        private _router: Router,
        private _sessionService: AppSessionService
    ) { }
canDeactivate(component: CheckUnsavedComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): boolean | import("@angular/router").UrlTree | import("rxjs").Observable<boolean | import("@angular/router").UrlTree> | Promise<boolean | import("@angular/router").UrlTree> {
        if (component.canDeactivate()) {
            return confirm('There are changes you have made to the page. If you quit, you will lose your changes.');
        } else {
            return true;
        }
    }

added 1 new class

import {Observable} from 'rxjs';

export declare interface CheckUnsavedComponent {
  canDeactivate: () => boolean | Observable<boolean>;
}

in tenant-settings.component.ts

canDeactivate() {        
        if (this.initialTimeZone !== this.settings.general.timezone )
            return true;
        else
            return false;
    }

in tenant-settings-routing.module.ts

const routes: Routes = [{
    path: '',
    component: TenantSettingsComponent,
    pathMatch: 'full', canDeactivate: [AccountRouteGuard],
}];

and it works as expected.

But my issue is I want to change the title of the confirm messageBox or I want to use our messageService.confirm to show the warning. I tried to use AspNet zero messageService.confirm there but it seems like works asynchronously. Could you please help me with this issue please.

  • 8.9
  • Angular
  • .net core

Hi, I want to use DHTMLX diagram library in my angular project, and they dont have any npm package for that. so we need to add their javascript & css files into our project. I add that files reference into index.html file as `

` but then I was not able to acces that library. Then I added that files reference into angular.json files after that I was able to access the library but for export feature I am getting the error below "failed to read the 'cssrules' property from 'cssstylesheet' cannot access rules". please suggest the proper way to add external javascript libraries into asp.net zero angular project. and details about the above error. Thanks
  • 8.9
  • Angular
  • net core

Hi, I want to use ngx-org-chart in my aspnet zero project. I am refering this link for that. So I am not able to import the file they have given in the link. i.e @import '~ngx-org-chart/_theming.scss';

I tried by putting @import '~ngx-org-chart/_theming.scss'; into "styles.css" as well as "custom-theme.scss" file. but didn't worked that. Can you please suggest where do I exactly put that import line in our aspnet zero project?

  • 8.9
  • Angular
  • .net core

Hi , I want to use angular material Datepicker in my asp.net zero application , I install material in my aaplication and put the code to use Material Datepicker, But then I got the below error.

"ERROR in getInternalNameOfClass() called on a non-ES5 class: expected MatCommonModule to have an inner class declaration"

Could you please help me with the steps to use angular material controls in my asp.net zero application.

  • 8.9?
  • Angular
  • .net core

I am using checkbox using kt-checkbox class , but not able to set "indeterminate" state for the checkbox.

<label for="pOverpGrowth" class="kt-checkbox" style="display: block;">
                                        <input id="pOverpGrowth" type="checkbox" [indeterminate]="myList">
                                        {{'PeriodOverPeriodGrowth' | localize}}
                                        <span></span>
                                    </label>

in above code myList variable value is set to true, If I not set class="kt-checkbox" to the label then the "indeterminate" state is working but I want indeterminate state working with the same above code.

Product version : 8.9 Product type : Angular Framework : .net core

I want to show spinner only on to the specific div which takes some time to load data in it. I have one simple div and I set [busyIf] directive to it. I get the spinner on my whole page which I don't want(spinner which we show using "this.spinnerService.show()"). Please help.

Showing 11 to 17 of 17 entries