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

fix(ng:options): compile null/blank option tag #593

Closed
wants to merge 3 commits into from

Conversation

TEHEK
Copy link
Contributor

@TEHEK TEHEK commented Oct 13, 2011

The latest version was throwing some cryptic
cannot access childNodes property of undefined
when using template in select's blank option.

This one required going really deep down to compiler. Turns out that when Template instance is created, it saves paths to (indexes of) child nodes which are to be compiled, then executes linker functions on given element and then proceeds to it's childNodes.

When had ng:options, it removed all from causing Template go try linking with unexistent element's childNode.

  • added guard check for compiler
  • refactored src/widget/select.js to compile blank option (I tried several options, but this one seems the most natural)
  • added some tests

Fixes #562

@IgorMinar
Copy link
Contributor

I cleaned up the commits and landed the changes. Thanks!

[angular.js] IgorMinar pushed 2 new commits to master: http://git.io/Wiy4aA

Can we send you a t-shirt now? http://goo.gl/D9uOx

@IgorMinar IgorMinar closed this Oct 20, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng:options - "not selected" option tag not compiled
3 participants