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

BUG: optional multi-slot transclusion with jquery #13169

Closed
petebacondarwin opened this issue Oct 26, 2015 · 1 comment
Closed

BUG: optional multi-slot transclusion with jquery #13169

petebacondarwin opened this issue Oct 26, 2015 · 1 comment

Comments

@petebacondarwin
Copy link
Member

@jtrancas commented 6 hours ago:

I'm totally new to AngularJS, however, I believe I found an issue when jQuery is being included along with Angular, I could not reproduce the error when Angular is running without jQuery.
The situation is the following:

  • jQuery is included.
  • There's a directive with all the transclude slots marked as optional.
  • There's a directive occurrence with no child slots defined.

You can check the following Plnkr: http://plnkr.co/edit/f9SN35IMPrmeyuPz0Pih?p=preview
The pane directive has no child nodes, all its transclude slots are optional, and you may notice the following error being raised in the console:

TypeError: Cannot read property 'replace' of undefined
    at directiveNormalize (angular.js:9033)
    at angular.js:8095
    at forEach (angular.js:354)
    at applyDirectivesToNode (angular.js:8094)
    at compileNodes (angular.js:7620)
    at compileNodes (angular.js:7632)
    at compileNodes (angular.js:7632)
    at compile (angular.js:7527)
    at angular.js:1677
    at Scope.$eval (angular.js:16127)

If you remove the jQuery inclusion it all goes well.

@lgalfaso
Copy link
Contributor

it looks like this is a regression from 2c8d87e
#13171 should take care of this

petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue Oct 26, 2015
lgalfaso added a commit that referenced this issue Oct 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants