or in your example can you add button to books3 page, and change the selected item to Books2 when the button is clicked.
Hello, Maybe you missed the points i am talking about, i want to change the menu item selection programmatically from typescript. Let's say i have another page "Books3 Update Page" For Ex which is not on the left menu items. I want Books3 to be selected when i load the page ("Books3 Update Page"). Can you do that programmatically when the "Books3 Update Page" is loaded.
Hello, yes exactly like that.
Hello, I am trying to programmatically select an item from the left menu and make it expanded or selected. I am injecting NavbarService, and tried to use expandItems() method. But it didn't work. Is there any example to programmatically select a menu item when the page is loading? this
this.navbarService.navbarItems$.subscribe(items => {
items.forEach(item => {
if (item.text === 'Approve It') {
item.expanded = true;
} else {
item.expanded = false;
}
this.changeDetectorRef.markForCheck();
});
});
or this
this.navbarService.expandItems();
not working.
Hello @maliming, The problem is fixed now, i have no idea how it has been fixed though, i have tried to delete all node_modules and delete yarn.lock. Also try to clean the yarn cache. The problem persisted. Then i restart the computer and recreate my docker images for postgresql, redis and rabbitmq, then the problem is solved, but i have no clue how it has been fixed.
there were no errors on the backend side.
2024-06-15 01:09:30.647 +02:00 [INF] Route matched with {area = "clientManagement", controller = "Clients", action = "Get", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Doohlink.ClientManagement.Clients.ClientDto] GetAsync(System.Guid) on controller Doohlink.ClientManagement.Clients.ClientController (Doohlink.ClientManagement.HttpApi).
2024-06-15 01:09:30.650 +02:00 [INF] Executing action method Doohlink.ClientManagement.Clients.ClientController.GetAsync (Doohlink.ClientManagement.HttpApi) - Validation state: "Valid"
2024-06-15 01:09:30.682 +02:00 [INF] Executed action method Doohlink.ClientManagement.Clients.ClientController.GetAsync (Doohlink.ClientManagement.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 32.2896ms.
2024-06-15 01:09:30.683 +02:00 [INF] Executing ObjectResult, writing value of type 'Doohlink.ClientManagement.Clients.ClientDto'.
2024-06-15 01:09:30.683 +02:00 [INF] Executed action Doohlink.ClientManagement.Clients.ClientController.GetAsync (Doohlink.ClientManagement.HttpApi) in 35.4488ms
2024-06-15 01:09:30.683 +02:00 [INF] Executed endpoint 'Doohlink.ClientManagement.Clients.ClientController.GetAsync (Doohlink.ClientManagement.HttpApi)'
2024-06-15 01:09:30.863 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:30.872 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:30.895 +02:00 [INF] Executing endpoint 'Doohlink.ClientManagement.Clients.ClientController.GetListAsync (Doohlink.ClientManagement.HttpApi)'
2024-06-15 01:09:30.895 +02:00 [INF] Route matched with {area = "clientManagement", controller = "Clients", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Doohlink.ClientManagement.Clients.ClientDto]] GetListAsync(Doohlink.ClientManagement.Clients.ClientListFilterDto) on controller Doohlink.ClientManagement.Clients.ClientController (Doohlink.ClientManagement.HttpApi).
2024-06-15 01:09:30.898 +02:00 [INF] Executing action method Doohlink.ClientManagement.Clients.ClientController.GetListAsync (Doohlink.ClientManagement.HttpApi) - Validation state: "Valid"
2024-06-15 01:09:30.921 +02:00 [INF] Executed action method Doohlink.ClientManagement.Clients.ClientController.GetListAsync (Doohlink.ClientManagement.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 23.1177ms.
2024-06-15 01:09:30.921 +02:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.PagedResultDto`1[[Doohlink.ClientManagement.Clients.ClientDto, Doohlink.ClientManagement.Application.Contracts, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]'.
2024-06-15 01:09:30.921 +02:00 [INF] Executed action Doohlink.ClientManagement.Clients.ClientController.GetListAsync (Doohlink.ClientManagement.HttpApi) in 26.1573ms
2024-06-15 01:09:30.921 +02:00 [INF] Executed endpoint 'Doohlink.ClientManagement.Clients.ClientController.GetListAsync (Doohlink.ClientManagement.HttpApi)'
2024-06-15 01:09:31.107 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:31.112 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:31.180 +02:00 [INF] Executing endpoint 'Doohlink.Screens.ScreenController.GetListAsync (Doohlink.HttpApi)'
2024-06-15 01:09:31.180 +02:00 [INF] Route matched with {area = "doohlink", controller = "Screens", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Doohlink.Screens.ScreenInListDto]] GetListAsync(Doohlink.Screens.ScreenListFilterDto) on controller Doohlink.Screens.ScreenController (Doohlink.HttpApi).
2024-06-15 01:09:31.203 +02:00 [INF] Executing action method Doohlink.Screens.ScreenController.GetListAsync (Doohlink.HttpApi) - Validation state: "Valid"
2024-06-15 01:09:31.289 +02:00 [INF] Executed action method Doohlink.Screens.ScreenController.GetListAsync (Doohlink.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 86.0839ms.
2024-06-15 01:09:31.289 +02:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.PagedResultDto`1[[Doohlink.Screens.ScreenInListDto, Doohlink.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
2024-06-15 01:09:31.289 +02:00 [INF] Executed action Doohlink.Screens.ScreenController.GetListAsync (Doohlink.HttpApi) in 109.2992ms
2024-06-15 01:09:31.289 +02:00 [INF] Executed endpoint 'Doohlink.Screens.ScreenController.GetListAsync (Doohlink.HttpApi)'
2024-06-15 01:09:32.108 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:32.110 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:32.143 +02:00 [INF] Executing endpoint 'Doohlink.Campaigns.CampaignController.UpdateAsync (Doohlink.HttpApi)'
2024-06-15 01:09:32.144 +02:00 [INF] Route matched with {area = "doohlink", controller = "Campaigns", action = "Update", page = ""}. Executing controller action with signature System.Threading.Tasks.Task UpdateAsync(System.Guid, Doohlink.Campaigns.UpdateCampaignDto) on controller Doohlink.Campaigns.CampaignController (Doohlink.HttpApi).
2024-06-15 01:09:32.166 +02:00 [INF] Executing action method Doohlink.Campaigns.CampaignController.UpdateAsync (Doohlink.HttpApi) - Validation state: "Valid"
2024-06-15 01:09:32.207 +02:00 [INF] Executed action method Doohlink.Campaigns.CampaignController.UpdateAsync (Doohlink.HttpApi), returned result Microsoft.AspNetCore.Mvc.EmptyResult in 41.3137ms.
2024-06-15 01:09:32.207 +02:00 [INF] Executed action Doohlink.Campaigns.CampaignController.UpdateAsync (Doohlink.HttpApi) in 63.3134ms
2024-06-15 01:09:32.207 +02:00 [INF] Executed endpoint 'Doohlink.Campaigns.CampaignController.UpdateAsync (Doohlink.HttpApi)'
2024-06-15 01:09:33.962 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:33.964 +02:00 [INF] CORS policy execution successful.
2024-06-15 01:09:33.988 +02:00 [INF] Executing endpoint 'Doohlink.Campaigns.CampaignController.GetListAsync (Doohlink.HttpApi)'
2024-06-15 01:09:33.988 +02:00 [INF] Route matched with {area = "doohlink", controller = "Campaigns", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Doohlink.Campaigns.CampaignInListDto]] GetListAsync(Doohlink.Campaigns.CampaignListFilterDto) on controller Doohlink.Campaigns.CampaignController (Doohlink.HttpApi).
2024-06-15 01:09:34.011 +02:00 [INF] Executing action method Doohlink.Campaigns.CampaignController.GetListAsync (Doohlink.HttpApi) - Validation state: "Valid"
2024-06-15 01:09:34.045 +02:00 [INF] Executed action method Doohlink.Campaigns.CampaignController.GetListAsync (Doohlink.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 34.7376ms.
2024-06-15 01:09:34.046 +02:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.PagedResultDto`1[[Doohlink.Campaigns.CampaignInListDto, Doohlink.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
2024-06-15 01:09:34.046 +02:00 [INF] Executed action Doohlink.Campaigns.CampaignController.GetListAsync (Doohlink.HttpApi) in 57.2554ms
2024-06-15 01:09:34.046 +02:00 [INF] Executed endpoint 'Doohlink.Campaigns.CampaignController.GetListAsync (Doohlink.HttpApi)'
and whenever call is reached to the backend side it was updating the database. Only problem was after the http call whenever client side see status 204 it redirected to the error page.
Anyway for now we can close this ticket. If it happens again, i can create a new ticket for it.
Hello i have upgraded my project from 8.1.1 to 8.1.3 soon. It was a smooth transition but afterwards i realized, if i do a call to backend and backend do not return anything as response then leptonx theme is redirecting the page to an error page.
When i do the same call through postman what i get is 204 response.
what can be the reason that ui is redirected to error page. Whenever http call is 204 response instead of 200 response?
Hello, My problem is not with the angular project that is created with template. I am adding an extra angular project to the folder with angular cli and configuring it accordingly. When i do that i am getting localization error. I will prepare the sample project on weekend and send it to you.
how do you know which port i am running it :) I am running it on port 4201 already and i have configured it with port 4201. And i do not run it on docker. And i do not understand how loading dependencies (@angular/common) is related with port configuration?
Hello, I have created a new angular project that will run side by side with the original project. I have created the angular project from scratch and manage to make it work here is my package.json
{
"name": "angular-extra",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --port 4201 --open",
"build": "ng build",
"build:prod": "ng build --configuration production",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@abp/ng.components": "~8.1.3",
"@abp/ng.core": "~8.1.3",
"@abp/ng.oauth": "~8.1.3",
"@abp/ng.setting-management": "~8.1.3",
"@abp/ng.theme.shared": "~8.1.3",
"@volo/abp.commercial.ng.ui": "~8.1.3",
"@volo/abp.ng.openiddictpro": "~8.1.3",
"@volo/abp.ng.language-management": "~8.1.3",
"@volosoft/abp.ng.theme.lepton-x": "~3.1.3",
"@angular/animations": "~17.1.0",
"@angular/common": "~17.1.0",
"@angular/compiler": "~17.1.0",
"@angular/core": "~17.1.0",
"@angular/forms": "~17.1.0",
"@angular/localize": "~17.1.0",
"@angular/platform-browser-dynamic": "~17.1.0",
"@angular/platform-browser": "~17.1.0",
"@angular/router": "~17.1.0",
"rxjs": "~7.8.0",
"tslib": "^2.0.0",
"zone.js": "~0.14.0",
"@stripe/stripe-js": "^2.1.1"
},
"devDependencies": {
"@abp/ng.schematics": "~8.1.3",
"@angular-devkit/build-angular": "~17.1.0",
"@angular-eslint/builder": "~17.2.0",
"@angular-eslint/eslint-plugin": "~17.2.0",
"@angular-eslint/eslint-plugin-template": "~17.2.0",
"@angular-eslint/schematics": "~17.2.0",
"@angular-eslint/template-parser": "~17.2.0",
"@angular/cli": "~17.1.0",
"@angular/compiler-cli": "~17.1.0",
"@angular/language-service": "~17.1.0",
"@types/jasmine": "~3.6.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"eslint": "^8.0.0",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.0.0",
"typescript": "~5.3.0"
}
}
Whenever i run it, i am getting an locale error.
I know this questions have been asked. And the solution was try to downgrade Angular version to 17.1.x. I have deleted all the node_modules dir. Also yarn.lock file and clear the cache. It still gives me the error. And you can see angular version is 17.1.3 from here.
if i create a new project from scratch there is no problem. when i look at the sources tab in google chrome dev. I am seeing that @angular/common is not loaded. I think the problem is happening because of that. You can see not working angular project below.
and here is the sources from the new abp project.
what can be the reason that my new angular project that is created with angular cli do not load @angular/common/locales but new abp template has it? what am i forgetting to include here?
If you are talking about HttpApi.Host project that is already disabled. So it doesn't work. Isn't there any workaround so it can be done through angular while it posts to the server side?