Angular Dart from the Beginning: 16 Custom Attribute Directives

preview_player
Показать описание
In this video, we create a custom attribute element. When placed within the element, you do not need any additional characters to identify the attribute. Just put in the name of the attribute into the element.
Рекомендации по теме
Комментарии
Автор

Hi, could you please make videos how to include interactive charts?

mictadlo
Автор

Thank you for the amazing video series. Really easy to get up to speed with the framework while following your series. Your solution does work for the time being with the AngularDart framework, but some features will be removed in future versions. A working version (for the future) would be:
// Import for Element or HtmlElement
import 'dart:html';

// COMMON_DIRECTIVES changed to coreDirectives.
directives: [coreDirectives, AttrDirective]

@Directive(selector: '[myAttrDirective]')
class AttrDirective {
final Element e;
AttrDirective(this.e);
void magnify([String size]) {
e.style.fontSize = size;
}
// ... HostListeners ...
}

fredrikbakken