adammark/Markup.js

Access outer properties from within a loop

prabhu opened this issue · 1 comments

var data = {
a = 'hello world',
b = [{k: 'foo'}, {k: 'bar'}]
}

{{b}}
How do I access a here?
{{/b}}

Thanks for the note. It's not really a supported use case, although you could try the 'set' pipe to make "a" a global variable inside the template. (See docs.)