mahpour / enjoyhint-angular

Added support to work with angular ngClick events
1 stars 3 forks source link

Angular2 implementation for enjoyhint #1

Open hudebarun1 opened 6 years ago

hudebarun1 commented 6 years ago

Hi, I was trying to implement in angular 2. Do we have the angular2 implementation for enjoyhint?

Do we have an npm for angular 2 for enjoyhint? If yes, how do we use it?

thanks

mahpour commented 6 years ago

Unfortunately not. I may implement an angular 2+ version later this year.

On Thu, Jul 19, 2018 at 8:29 AM hu.debarun notifications@github.com wrote:

Hi, I was trying to implement in angular 2. Do we have the angular2 implementation for enjoyhint?

Do we have an npm for angular 2 for enjoyhint? If yes, how do we use it?

thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mahpour/enjoyhint-angular/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMVUQYT5RhYbgtgR2TS4WgDYa7Li773ks5uIHvDgaJpZM4VWTwc .

chrispinzaru commented 6 years ago

I could implement/port it to Angular 2+, but I think a good idea would be to remove jQuery dependency ... how do you think? I think almost no one uses Angular with jQuery. Any thoughts on structure, directives or classes would be helpful!

mahpour commented 6 years ago

I think using directives would be a good approach to begin with but I imagine we would also need a set of state management services to follow that.

chrispinzaru commented 6 years ago

Does this mean you'd like to use NGRX, for example?

mahpour commented 6 years ago

I think NGRX is a bit too heavy for making a portable independent module. I would make it generic with a Provider approach which ngrx can be also one to use.

Bogatinovski commented 6 years ago

Have you started porting it to Angular yet ?

christinegomes95 commented 5 years ago

I was able to integrate enjoyhint into my Angular4 project. I created a folder in my src named enjoyhint and pasted the enjoyhint files Download Kineticjs from their website http://kineticjs.com/ (I used kinetic-v5.1.0.tar build) and paste into your assets. I added in index.html:

In app.component.ts, I imported kinetic and jquery.enjoyhint import 'Kinetic'; import 'enjoyhint/src/jquery.enjoyhint';

After this, you may add your steps as mentioned in the documentation - I added it in AfterView Init

var enjoyhint_script_data = [{ selector:'#filters', event:'click', description:'Select all completed tasks', }];

var enjoyhint_instance = null;
$(document).ready(function(){
  enjoyhint_instance = new EnjoyHint({});
  enjoyhint_instance.setScript(enjoyhint_script_data);
  enjoyhint_instance.runScript();
});

Hope this helps

Maxouhell commented 5 years ago

@mahpour any news ? I'm intersted by using your lib' in angular, but I don't want to use JQuery 🤔

chrispinzaru commented 5 years ago

@Maxouhell Hey! Sorry for long time no updates. If you can wait, I will try in a ~1 week port it to Angular. The port of Enjoyhint itself will contain the jQuery under the hood, but you'll be able to use the port with Angular just like a norma ngxl plugin. Recently I was involved in other activities, so please pardon my lateness. Please leave me a message with min target version of Angular (I assume Angular 4) to use with.

rhlkumar234 commented 4 years ago

@chrispinzaru did you get a chance to do it? Is it ported to angular? Thanks