0

I am using Angular2 (2.3.1) and gridstack.js (gridstack.js 0.3.0) with jquery 1.11.1. Tried following this example

https://stackoverflow.com/questions/39901473/wrap-gridstack-js-into-angular-2-component

to get gridstack.js to work with Angular 2 and getting following errors:

zone.js:170 Uncaught TypeError: $(...).gridstack is not a function at HTMLDocument. (http://localhost:8080/:111:26) at mightThrow (eval at webpackJsonp.87.module.exports (http://localhost:8080/scripts.bundle.js:88:9), :3583:29) at process (eval at webpackJsonp.87.module.exports (http://localhost:8080/scripts.bundle.js:88:9), :3651:12) at ZoneDelegate.invokeTask (http://localhost:8080/polyfills.bundle.js:16599:31) at Zone.runTask (http://localhost:8080/polyfills.bundle.js:16398:47) at ZoneTask.invoke (http://localhost:8080/polyfills.bundle.js:16652:38) at data.args.(anonymous function) (http://localhost:8080/polyfills.bundle.js:17813:29)

Not sure how to go about fixing this. Any help would be appreciated.

Thanks.

1
  • Seems like you need to add the .js files to angular-cli.json as well not just index.html. Commented Dec 29, 2017 at 16:40

1 Answer 1

1

$(...).gridstack is not a function

the jquery lib extended by gridstack is not the same jquery lib you use in angular component.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.