Base solution for your next web application

Activities of "alexanderpilhar"

I encounter strange behaviour working with DateTime and Timing (Core/Angular, 6.4.0).

I use ClockProviders.Utc (set in CoreModule.cs). I can choose a Timezone for Host, Tenant and user profile, so i think Timing is configured correctly.

Current situation:

  • I have a model that has two properties of type DateTime (FromDateTime & ToDateTime).
  • Host, Tenant and user profile are all set to use timezone "Standard [UTC]".
  • When I create a new entity everything is fine: values in client-side logging are correct, as well as values stored in database.
  • When I retrieve a list of entities all is fine as well: values are correct.
  • But, when I retrieve a single entity in order to edit it, or copy an item from the list to create a new one based on the original (both opened in a modal window) the values are off by one hour (which is the current timezone offset between UTC and "Europe/Vienna", UTC+1). Also, on server side the values are still correct (AppService.cs).
  • In both cases (list of entities and single entity) _isAMomentObject, _isUTC and _isValid of the moment objects are true. _offset is -0, but not sure what the consequences are, if any.

Am I doing something wrong here? Am I missing something? Please, help!

BTW, I will be away for two weeks - so it will propably take some time till i can check out your advise and answer to your comments.

UPDATE #1 I will recreate the components in a clean project, just to see if there are any configuration issues in my project.

UPDATE #2 Recreated components: values (list of entities and single entity) are the same, so that's working correct. And there might be an issue with my create/edit-component.

BTW: ngx-bootstrap/datepicker does not work with moment.js yet ([github: #4826](https://github.com/valor-software/ngx-bootstrap/issues/4826)). In DemoUiDateTimeComponent usage of ngx-bootstrap/datepicker is demonstrated to select a date / date-range using moment.Moment / moment.Moment[] as data-type. At the moment, this works for selecting a date only and it will not work when the value gets set via code (invalid date).

Please, help me: How do I implement sorting for multi-lingual entities? I have a simple entity that implements IMultiLingualEntity. I just recognized sorting doesn't work (using GetAllPagedSortedAndFilteredInputDto). I tried playing around with pSortableColumn-value but can't figure it out. Is it even possible this way?

I'm having troubles implementing the 'action-menu' for table-items in a modal window. The action-menu should allow me to select actions such as editing and deleting translations for the selected entity. But instead of showing the dropdown with its menu-item, it just saves changes (I get a toast stating changes have been saved) and closes the modal window. Also there are warnings related to sweetalert2 shown in console.

I implemented the action-menu the same way it's done everywhere else ASPNETZERO. Already checked that for errors - unable to find any issues there. Also, I tried to implement it exactly as documented by ngx-bootstrap - doesn't help either.

For now, I switched to use separate buttons instead of the dropdown-menu. But I'd like to have the dropdown because of consistency.

Please, see if you can reproduce the problem (there is no such implementation in ASPNETZERO of a modal that implements a data-table with an action-menu for each data-item).

I'm currently receiving error-notification when trying to send a message in chat (both on my dev environment as well as on demo.apsnetzero.com; both ASP.NET Core & Angular; ASPNETZERO 5.5.0):

[attachment=0:3evupvak]aspnetzero-chat-send_message-error-20180908.png[/attachment:3evupvak]

AppService method does not get called. There are no errors logged to browser console.

Please, confirm whether there is a problem in ASPNETZERO 5.5.0? If not, why do I encounter this error on demo.aspnetzero.com as well?

I'm having troubles with swagger ui after publishing Web.Host-project to on-premise IIS. It's just a test-deployment and is therefor located in a subfolder (accessible via <a class="postlink" href="https://mydomain.local/project-name/">https://mydomain.local/project-name/</a>).

swagger ui shows following error message:

Failed to load API definition. Errors Fetch error Not Found /swagger/v1/swagger.json

I guess this is because the project is located in a subfolder!?

If so, please, tell me how to make this work!

Is there a way to run both versions of SignalR in parallel server-side (Core, Angular, v5.5.0)? I'm asking because I still have to support some IoT-Clients using AspNet.SignalR.

I tried implementing stuff the way it was implemented in v4.6.0 - but no luck so far ... Client's HubConnection.State is Connected, but invoking something doesn't work (500, internal server error).

Any ideas?

After upgrading my Project (ASP.NET Core & Angular with .NET Framework 4.6.1) from version 5.0 to 5.5 I experience the very same issue: [https://github.com/aspnetzero/aspnet-zero/issues/597]) - which seems to have been resolved by upgrading the version of abp-ng2-module ([https://github.com/aspnetzero/aspnet-zero-core/commit/1bc5f34f913c8f76980367fa90e9063b3733ec95])).

I'm using abp-ng2-module 3.0.0 - it is the current version at the moment ([https://www.npmjs.com/package/abp-ng2-module])).

Note: I experience this issue in every browser I have installed (Chrome, Edge, Firefox (Current & Dev Edition), Internet Explorer, Opera, Vivaldi). Also, changing tenant does not work (no error message).

I don't quite know where to look for to solve this problem. Could anyone help, please!?

I'm having troubles trying to unsubscribe from some custom event. I use SignalR to trigger an event once an entity gets updated and everything is working fine so far. But when I leave the component and come back to it later, the event will be received for another (although it only gets triggered once, both on erver side as well as on client side - I already checked on that). The more times I leave and come back to the component, the more times the event will be received.

I read the documentation about subscribing and unsubscribing on [https://aspnetboilerplate.com/Pages/Documents/Javascript-API/Event-Bus]) and since unsubscribing isn't demonstrated by example, I came up with this:

private subscribe(): void {
   abp.event.on(this.evGetUpdate, (data) => this.onGetUpdate(data));
}

private unsubscribe(): void {
   abp.event.off(this.evGetUpdate, (data) => this.onGetUpdate(data));
}

onGetUpdate(data: any): void {
   console.log("event received:");
   console.log(data);
}

I think this is how it should work, but no luck. Btw: I'm calling subscribe() in ngOnInit() and unsubscribe() in ngOnDestroy() which are also executed as expected.

Please, give me some advice on how to unsubscribe from abp.event correctly!

Question

I'm trying to build another client for my project which will be used for read-only purposes only. Therefor I want to reduce the libraries used in the default Angular project. Right now I'm removing libraries from angular-cli.json and see if the project still works. But this approach is quite slow. Also there are a lot of errors and I have to find out which library is missing.

Basically, I want to be able to communicate with the server-side using service-proxies as it's done in the default Angular client. Also, I want to be able to use most of the abp-functionalities like localization, timing and so on.

What would be a good aproach to build my reduced Angular client? Am I on the right path? Or should I rather start from scratch and just include the stuff I want to use? If so, how do I start and what do I have to include?

Cheers!

Hi!

I want to use bootstrap-tabdrop ([https://github.com/jmschabdach/bootstrap-tabdrop])) for a tab-set (Core, Angular). I added the library to src/assets/bootstrap-tabdrop/... and also added entries to typings.d.ts and .angular-cli.json but no success... I have to admit I don't really know how to add a third-party library correctly - so, I just had a look at how it's done for bootstrap-datetimepicker and tried to reproduce that. But I might be missing something.

Any tips on how to make this work?

Thank you!

Showing 41 to 50 of 51 entries