In dart polymer how to define nested custom element? - dart

I want to build a library for custom elements with Dart Polymer, the architecture looks like this:
<parent-custom-element attributes="xxxx">
<child-custom-element-0 attributes="yyyyy"> </child-custom-element-0>
<child-custom-element-1 attributes="zzzzzzzz"> </child-custom-element-1>
</parent-custom-element>
The requirement is that: the child-custom-element could access the DOM/variables/object of the parent-custom-element. For example, if the parent-custom-element has a canvas object, the child-custom-element could draw line, or circle on it.
Any ideas how to do it? Or any examples to guide me?
Thanks!

I wrote a blog post about nesting polymer elements:
http://www.roberthartung.de/nested-polymer-elements-and-data-binding-in-googles-dart/
This should help you to understand how to nest elements. Feel free to ask further questions!
Regards
Robert

Related

Could not find a tree control for the tree

I am facing an error for sample code I am using angular 6 and angular material for application design:
<mat-tree>
<mat-tree-node> parent node </mat-tree-node>
</mat-tree>
Error Message:
Error: Could not find a tree control for the tree
any help much appreciated.
The documentation on Material Angular is not super clear about it...
You need tho specifie a [treeControl]="nestedTreeControl" of the type NestedTreeControl<FileNode>;
If you go to Material Angular Tree Component and check the code you will understand easily.
In case you really want to work with a flat tree then this error also appears when you accidentally use <mat-nested-tree-node> instead of <mat-tree-node>.

DokuWiki: Highlight Part in code Block?

I want to highlight/emphasize a part in a code block in dokuwiki.
I could not find a hint in the docs: https://www.dokuwiki.org/wiki:syntax#code_blocks
But maybe I am missing something.
Background: I am not searching for syntax highlighting. I want to emphasize a part.
That's not possible. There are alternative highlight plugins (code2 seems to be popular) that might be able to do that.

Can I add Dart Web UI bindings to DOM elements created in code?

In the Dart Web UI package, it is possible to create bindings using the {{}} or bind-value syntax. Is this also possible, when DOM elements are created in code?
Something like
new Element.html('<div>Value: {{str}}</div>');
and
new Element.html('<input type="text" bind-value="str">');
binding an event to str, without manually piecing the strings together?
Note: this question was asked earlier today, but was deleted before it was answered, but I wanted to know the answer, so I'm reposting it.
Quick answer, no.
The bindings need to be processed by the dwc transformer, which converts Web Components and MDV code into "vanilla" Dart and HTML (suitable for compilation to "vanilla" JavaScript).
Generally, you should use <template> tags to instantiate new elements.
An alternative is to wrap these bits of text inside a custom element, which you can transform with dwc and instantiate manually.

c++ dom parsing problem

hi every body
i'm new to xercses C++dom parser.can anyone tell me
can we write our own getElementsBytagName,GetNodeValue etc function ?
how to write these function and use them in my code ?
can anybody explain me the process of Dom parsing?
xerces provides methods like getElementsBytagName so you can use them in your application.
Have a look at xerces programming guide you can find there how to parse xml file and how to get elements and attributes.

How can I remove the numeration of some titles in LaTeX?

I'm writing my degree project report using the article class and I want a structure like this:
Abstract
Introduction
1. What
2. Where
3. Etc.
I was searching and I found that using \setcounter{secnumdepth}{-1} the complete numeration is eliminated. And if I use * these sections don't appear in the table of content. So what can I do? Can this be done without installing packages (like memoir)?
Note:
It was asked before, but I did not find it when I searched. Sorry :(
use:
\section*{Foo and Bar}
\addcontentsline{toc}{section}{Foo and Bar}
Using the * version of the section commands might help. Try \section*{Abstract} and see if it is close enough.

Resources