funnies
funnies copied to clipboard
Write an angular directive for funnies!
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!
Which version of Angular you wanna take first? AngularJS or Angular 2 ?
@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?
@1egoman no problem. In case it would be more helpful !
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>
@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!
@1egoman Any interest in an Angular 1.x directive?
@kevinralph Sure!