For example, I have a piece of code like this:
String_test="
<template>
<label> {{count2}} SSSSSSSSSSSSSSSSSSSSSSSSS </label>
<input id="input1" type='text' value='{{count2}}'>
</template>"
and I want to assign String_test to another element, like:
DivElement span2 = new Element.tag("div");
span2.setInnerHtml(String_test);
_content.nodes.add(span2);
However, the "< template >' tag is not recognized, nothing will show up.
NOTE: My purpose is to use setInnerHtml to dynamically add contents to the webpage with data-binding still OK.
Any ideas?
Thanks!
Incrementing a member into an object, error
$list = @()
$cels = @()
$objResult = @()
$list =
"1384630490 1 68 4 adm-media03 4184066 4184062 0 nbpem CLIENT POLICY SBT_windows_srv_siteservers_isolation SCHED Diff EXIT STATUS 0 (the requested operation was successfully completed)",
"1385148607 1 68 4 adm-media01 4277480 4277295 0 nbpem CLIENT POLICY SCHED Full EXIT STATUS 87 (media close error)"
$i = 0
foreach ($row in $list){
$cels = $row.split(" ")
foreach ($cel in $cels) {
$objResult += New-Object -TypeName PSObject -Property @{
"T$i" = $cel
}
$i++
}
}
and the result of
$objResult | gm
is:
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
T0 NoteProperty System.String T0=1384630490
Why is not adding all the propierties intoo the object?
Every new property should be inserted after iteration of $i with the value of $cell
And shomething is not ok, i can`t figure it out what is the problem.
It should look like:
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
T0 NoteProperty System.String T0=1384630490
T1 NoteProperty System.String T1=1
T2 NoteProperty System.String T2=68
T3 NoteProperty System.String T3=4
T4 NoteProperty System.String T4=adm-media03
etc.