Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ng-include not working for script tag #12253

Closed
OpenSiteMobile opened this issue Jul 1, 2015 · 2 comments
Closed

ng-include not working for script tag #12253

OpenSiteMobile opened this issue Jul 1, 2015 · 2 comments

Comments

@OpenSiteMobile
Copy link

Low priority: A simple demo of ng-include for inserting a script tag into the current page works only when jQuery is loaded. Without jQuery, AngularJS gives the error:

Uncaught Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element
http://errors.angularjs.org/1.4.1/jqLite/nosel
REGEX_STRING_REGEXP
@ angular.js:68JQLite
@ angular.js:2747doBootstrap
@ angular.js:1597bootstrap
@ angular.js:1642(anonymous function)

Here is the demo: http://plnkr.co/edit/ONlkgveTpmXxTAFa30Qf?p=preview

Not a big deal since I always use jQuery anyway, but I don't see where it is expecting jqlite to do a "selector" lookup? (note: Plunker doesn't error - just doesn't do anything)

@pkozlowski-opensource
Copy link
Member

See #3756. In short - I don't think we want to support this without jQuery (and even with jQuery included I would advice against)

@OpenSiteMobile
Copy link
Author

Yeah, I didn't like it either. I load script files directly instead. It was just a test case I was updating for v1.4.1 and noticed the error.

Thanks.

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

No branches or pull requests

2 participants