Base solution for your next web application

Activities of "alexanderpilhar"

FYI

In case you are using Bootstrap 3 Datetimepicker ([http://eonasdan.github.io/bootstrap-datetimepicker/])) and want to work with a specific timezone, there is a timeZone-option which is not documented ([https://github.com/Eonasdan/bootstrap-datetimepicker/issues/2118])) but can be used to set the datetimepicker's timezone to UTC (or whatever you want to use).

It's very useful in case you want to initialize a datetimepicker with a pre-set moment-object. Without this timeZone-option set there can occur really confusing results, like mismatching display- and date-values.

Is there a way to make swagger map actions/methods that start with "Edit" to PUT? Some configuration option maybe? I can't find any information on that.

I started working with AspNetZero by following your step-by-step-guide using "Edit" all the time. I just encountered the fact that swaggers maps them all to POST. Changing every action/method to start with "Update" is quite some task at the point where i am now ...

Thanks aaron :D I did try to use the attributes but couldn't figure out which reference I was missing - thank you very much for pointing it out!

I use rimraf ([https://github.com/isaacs/rimraf])) to delete node_modules. Deletes stuff in node_modules when everything else fails.

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!

@ismcagdas Thanks for your assessment! Wish me luck ;)

Okay, so removing libraries I'm not going to use wasn't that hard after all. But of course I also want to remove all of the components that I'm not going to use - and this took me a while, although it turned out to not be too difficult after all. I just played around a bit trying to figure out what would be the best approach for me to reduce the ASP.NETZERO Angular client and keep it all updateable/upgradeable in case a new version of ASP.NETZERO gets published.

I'm confident that I found a good approach for me now! I'm happy to share my experience with you as soon as I'm done and sure everything still works as expected.

By then - have a nice Weekend :)

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!

Oh, how could I just do it wrong :roll: :lol: Thanks a lot, @aaron !

I encountered some other problems with my original example: the way I declared the callback function that is used for subscribing and unsubscribing just wouldn't let me access any properties of my class. The declaration that now does work looks like this:

onGetUpdate = (data: MyClass) => {
   this.item = data;
}

Just to let you know ;)

Showing 11 to 20 of 224 entries