How to use dependecy injection in flutter?

Issue I wan to use di. in flutter and I add this https://pub.dartlang.org/packages/di packages my project and I started to read this https://webdev.dartlang.org/angular/guide/dependency-injection article, but I don’t fully understand. So it’s ok: use @Injectable() annotation on services class(e.g: MyServices), but

Continue reading

Data binding to a Map in Angular Dart

Issue I’m trying to implement functionality for checking multiple items in a list of checkboxes. I am using a Map to store the data and its selected/unselected state. List<String> fruits = [ {‘fruit’: ‘apple’, ‘selected’: true}, {‘fruit’: ‘banana’, ‘selected’: true},

Continue reading

AngularDart on Firefox fails with "receiver.webkitCreateShadowRoot is undefined"

Issue I have an AngularDart application that is working fine on Chromium and Chrome with Javascript. But in Firefox and IE, I get the following error: [14:36:14.648] “NullError: receiver.webkitCreateShadowRoot is undefined STACKTRACE: .Element.createShadowRoot$0@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:84445 J.createShadowRoot$0$x@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:153659 ._ComponentFactory.call$6@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:11337 .BlockFactory__instantiateDirectives__closure2.call$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:11097 .Primitives_applyFunction@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:5148 ._FactoryProvider.get$2@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:125034 J.get$2$x@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:153716 .DynamicInjector__getInstanceBySymbol_closure.call$0@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:124806

Continue reading

AngularDart components and model binding

Issue Is it possible to bind an AngularDart ngComponent to a model and then manipulate that model from the component and see the changes outside of the changes outside of ngComponent. For example <myawsomecomponent ng-model=”{{name}}”></myawesomecomponent> <label>{{name}}</label> myAwesomeComponent will do some

Continue reading

Puzzled by CSS selector to trigger controller

Issue I’m having trouble understanding how an attribute selector can be used to restrict the scope of a controller. Here’s the minimal controller code: import ‘package:angular/angular.dart’; @NgDirective( selector: ‘[my-controller]’, publishAs: ‘ctrl’ ) class MyController { String foo = ‘fooooooooooooo’; }

Continue reading