Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write an angular directive for funnies! #3

Open
1egoman opened this issue Oct 16, 2016 · 7 comments
Open

Write an angular directive for funnies! #3

1egoman opened this issue Oct 16, 2016 · 7 comments

Comments

@1egoman
Copy link
Owner

1egoman commented Oct 16, 2016

Funnies has a raw javascript, react, and jquery bindings. I've had many requests for Angular bindings too.

It's been a while since I used Angular, but I'm pretty sure that we'd want to make a directive called funnies, and have it render one of the funny phrases in here (probably in a span with a custom classname so it can be styled). Behind the scenes, you can consume this api to generate a random funny message to display. Bonus points if you can make the phrase change every couple seconds! 😄

Thanks for your help!

@kobvel
Copy link
Contributor

kobvel commented Oct 23, 2016

Which version of Angular you wanna take first? AngularJS or Angular 2 ?

@1egoman
Copy link
Owner Author

1egoman commented Oct 23, 2016

@kobvel I have familiarity myself with Angular 1.x, but I hear Angular 2 is the new hotness. Probably Angular 2? What do you think?

@kobvel
Copy link
Contributor

kobvel commented Oct 23, 2016

@1egoman no problem. In case it would be more helpful !

@david1983
Copy link

david1983 commented Oct 25, 2016

I've done a component that cycles the funnies in Angular2, I've tried to use the same style of the one you have in the homepage, I've also added some animations.
Where do you want me to pull the .ts file ? do you want me to pull only the component or also a small demo (I've got the demo already)? Do you want me to do a small docs on how to install the component and how to use it ?

the usage is similar to the react implementation

<app-funnies [interval]="'4000'" [customMessages]="messages"></app-funnies>

@1egoman
Copy link
Owner Author

1egoman commented Oct 26, 2016

@david1983 This is really cool!

Go ahead and either add the code directly in the src/ folder or in a src/angular/ subfolder if there's more than one file. Also, if you wouldn't mind, could you add the required gulp configuration to compile and import?

Thanks a lot!

@kevinralph
Copy link

@1egoman Any interest in an Angular 1.x directive?

@1egoman
Copy link
Owner Author

1egoman commented Oct 28, 2016

@kevinralph Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants