Mateusz Lewandowski
2016-06-07 17:41:20 UTC
Hi.
i have a problem with core-menu in dart.
I create polymer element with core menu
<polymer-element name="menu-element">
<template>
<core-menu selected="0" on-core-select="{{SelectItem}}">
<core-item icon="dialog" label="OgÅoszenia"></core-item>
<core-item icon="settings" label="Logowanie"></core-item>
<core-item icon="search" label="Rejestracja"></core-item>
</core-menu>
</template>
</polymer-element>
I need to send to SelectItem function, selected item in my menu.
Here is my code:
class Menu extends PolymerElement {
Menu.created() : super.created();
void SelectItem(dom.CustomEvent e)
{
var detail = new js.JsObject.fromBrowserObject(e)['detail'];
if(detail['isSelected']) {
// var item = (detail['item'] as CoreItem);
print(detail['item'].label);
}
}
}
My approach does not work and my question is, how to send selected item value to function?
i have a problem with core-menu in dart.
I create polymer element with core menu
<polymer-element name="menu-element">
<template>
<core-menu selected="0" on-core-select="{{SelectItem}}">
<core-item icon="dialog" label="OgÅoszenia"></core-item>
<core-item icon="settings" label="Logowanie"></core-item>
<core-item icon="search" label="Rejestracja"></core-item>
</core-menu>
</template>
</polymer-element>
I need to send to SelectItem function, selected item in my menu.
Here is my code:
class Menu extends PolymerElement {
Menu.created() : super.created();
void SelectItem(dom.CustomEvent e)
{
var detail = new js.JsObject.fromBrowserObject(e)['detail'];
if(detail['isSelected']) {
// var item = (detail['item'] as CoreItem);
print(detail['item'].label);
}
}
}
My approach does not work and my question is, how to send selected item value to function?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.