javascript - AngularJS jasmine isolateScope() returns undefined -
I hope to get something from a different scope outside of my help-button
instruction
This should be a proper field based on properties, function () {var el = compile ('
- Before each trial, it
first (injection (function ($ collection, $ rootsecope, $ injector) {compile = $ compile ; Scope = $ RootScope $ New (); ...
It prints:
'el: [object object]' 'isolated scope: undefined'
The question is why am I coming back undefined even if there is nothing in a separate scope, then it is still empty object {item} } But anyway - the test is wrong - it does not show a separate scope, which (in fact) contains data.
I'm stupid.
But the answer to my own question will be because "stupid is stupid" - that is, once it can happen (or from future to me).
The problem was in my helpbutton.html
, which is using my directive (which I did not show / did not mention in this question).
Therefore TemplateUrl
was referring to helpbutton.html
that should be compiled properly on html.
Once I looked at the output of el.html ()
I found that it was not properly sung (there were some missing tags or something).
Because of the Thant, I could not find the element
from scope
.
(Although it would be nice to have an exception on any log on logs if a template is not render properly on html)
Comments
Post a Comment