hellsan631 / angular-fullpage.js

An angular directive for fullpage.js

Home Page:http://hellsan631.github.io/angular-fullpage.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

angular.element(...).fullpage is not a function

trsh opened this issue · comments

commented

Any ideas on this

modules.js?hash=f6ba1da…:23670TypeError: angular.element(...).fullpage is not a function

??

are you including the full-page library? Could you put up a plunkr or jsbin example that I could take a look at?

commented

No I cant. I'm using meteor. Big decency tree :(. And I am including full-page library. One thing comes in my mind is that full-page is set as fn of JQuery, anuglar.element is JQLite and another scope. By idea it should not work. Your thoughts?

commented

When changing in that line angular.element to $, it works. Any thoughts?

commented

P.S. im on angular 1.5.5

@trsh, I looked at angular-fullpage.js and notised that the directive is not full-page but fullPage.
Atleast the error disappears when you change that.

commented

@svirmasalo strange. I have lot of directives like BlaaBleeBaa, and they work by using them like blaa-blee-baa. Angular handles that.

@trsh yeah I think that was not the problem after all. Got things to work after I re-ordered scripts like they are presented at the Install part of readme.

@svirmasalo You should actually load jQuery first, before angular. That way angular doesn't have to load its jQuery Lite library alongside jQuery. (my docs show angular first,ill update that). The directive is camelcase, but for putting it on dom, you should use hyphens instead of camelcase (at least that's the way it is in the style guides)

closing this issue because it seems to have been resolved? let me know if the issue is still present for you @trsh after the fixes in this thread

commented

@hellsan631 I resolved It by changing angular.element to $ in directive (original line -> angular.element(element).fullpage(sanatizeOptions(scope.options));). So The original code is still throwing the same error. I'm loading libs in correct order.