1

So I'm trying to follow this post: What is the AngularJS way of handling a modal like this

I copied in everything and now I'm getting an error:

TypeError: Object [object Object] has no method 'reveal'

I'm still trying to learn how all of this works so sorry if this is obvious.

Community
  • 1
  • 1
Chad
  • 492
  • 5
  • 14
  • so http://foundation.zurb.com/ is included proper? – Michael Sep 19 '13 at 17:11
  • by the way, you really should show your code in the post and this part is the only relevant part of your error message: `TypeError: Object [object Object] has no method 'reveal'`. – m59 Sep 19 '13 at 17:13
  • Thanks, I removed the rest of the error. I did include foundation.js and foundation.reveal.js – Chad Sep 19 '13 at 17:15

1 Answers1

2

I used to have the same issue, that I was not able to get Foundation Reveal to work within my AngularJs App. But I fixed this issue by adding the following code

app.run(function($timeout){
    $timeout(function() {
        $(document).foundation();
    }, 500);
});

Well, I don't know any explanation for that, but it solved the issue.

Update:

Now there's an angular port that makes use of foundation javascript plugins. It has support for many foundation javascript plugins including Modal.

Github repository and demos.

Muhammad Reda
  • 26,379
  • 14
  • 93
  • 105
  • 1
    (Foundation or Bootstrap) + AngularJS is a bit of a challenge, since Angular is designed without the jQuery dom manipulation paradigm. AngularUI is essentially bootstrap written in the Angular paradigm. There's talk of the AngularUI team providing Foundation support at some point in the future, but until then, getting the two frameworks to cooperate will always be an uphill battle. – Clev3r Dec 28 '13 at 23:19