How do I call .then after .callMethod returns in Dart?

Issue I am trying to load a .czml file into a Cesium map using Dart. The javascript code works correctly and looks like this var viewer = new Cesium.Viewer(‘cesiumContainer’); viewer.extend(Cesium.viewerDynamicObjectMixin); viewer.dataSources.removeAll(); var czmlDataSource = new Cesium.CzmlDataSource(); czmlDataSource.loadUrl(‘Vehicle.czml’).then(function() { viewer.dataSources.add(czmlDataSource); });

Continue reading

How do I call .then after .callMethod returns in Dart?

Issue I am trying to load a .czml file into a Cesium map using Dart. The javascript code works correctly and looks like this var viewer = new Cesium.Viewer(‘cesiumContainer’); viewer.extend(Cesium.viewerDynamicObjectMixin); viewer.dataSources.removeAll(); var czmlDataSource = new Cesium.CzmlDataSource(); czmlDataSource.loadUrl(‘Vehicle.czml’).then(function() { viewer.dataSources.add(czmlDataSource); });

Continue reading

How do I call .then after .callMethod returns in Dart?

Issue I am trying to load a .czml file into a Cesium map using Dart. The javascript code works correctly and looks like this var viewer = new Cesium.Viewer(‘cesiumContainer’); viewer.extend(Cesium.viewerDynamicObjectMixin); viewer.dataSources.removeAll(); var czmlDataSource = new Cesium.CzmlDataSource(); czmlDataSource.loadUrl(‘Vehicle.czml’).then(function() { viewer.dataSources.add(czmlDataSource); });

Continue reading

How do I call .then after .callMethod returns in Dart?

Issue I am trying to load a .czml file into a Cesium map using Dart. The javascript code works correctly and looks like this var viewer = new Cesium.Viewer(‘cesiumContainer’); viewer.extend(Cesium.viewerDynamicObjectMixin); viewer.dataSources.removeAll(); var czmlDataSource = new Cesium.CzmlDataSource(); czmlDataSource.loadUrl(‘Vehicle.czml’).then(function() { viewer.dataSources.add(czmlDataSource); });

Continue reading

How do I call .then after .callMethod returns in Dart?

Issue I am trying to load a .czml file into a Cesium map using Dart. The javascript code works correctly and looks like this var viewer = new Cesium.Viewer(‘cesiumContainer’); viewer.extend(Cesium.viewerDynamicObjectMixin); viewer.dataSources.removeAll(); var czmlDataSource = new Cesium.CzmlDataSource(); czmlDataSource.loadUrl(‘Vehicle.czml’).then(function() { viewer.dataSources.add(czmlDataSource); });

Continue reading

How do I call .then after .callMethod returns in Dart?

Issue I am trying to load a .czml file into a Cesium map using Dart. The javascript code works correctly and looks like this var viewer = new Cesium.Viewer(‘cesiumContainer’); viewer.extend(Cesium.viewerDynamicObjectMixin); viewer.dataSources.removeAll(); var czmlDataSource = new Cesium.CzmlDataSource(); czmlDataSource.loadUrl(‘Vehicle.czml’).then(function() { viewer.dataSources.add(czmlDataSource); });

Continue reading

AngularDart Dependency Injection

Issue I’m using AngularDart and I can’t figure out how to inject my entry point dependencies. Main.dart: import ‘package:angular/angular.dart’; import ‘package:angular_dart/app_component.dart’; import ‘package:angular_dart/app_component.template.dart’ as ng; @GenerateInjector(const [ const Provider(MyRepository, useClass: ng.MyRepositoryImpl), ]) final InjectorFactory appInjector = ng.appInjector$Injector; void main() {

Continue reading

Angulardart markdown directive not working

Issue I’m trying to do the following: import ‘dart:html’; import ‘package:angular/angular.dart’; import ‘package:markdown/markdown.dart’ as md; @Directive(selector: ‘[markdown]’) class MarkdownDirective { @Input(‘markdown’) String marked; MarkdownDirective(Element el) { final html = md.markdownToHtml(marked); print(el.innerHtml); // this is empty print(html); // obv null el.setInnerHtml(html);

Continue reading

Using SASS in Angular Dart

Issue I am trying to figure out how to use .scss files in my AngularDart project. My app structure so far looks like this: -lib -src -signin_component -signin_component.dart -singin_component.html -signin_component.scss -signin_component.scss.css -route_paths.dart -routes.dart -app_component.css -app_component.dart -app_component.html The pubspec.yaml file contains

Continue reading

How do I use a select element's onchange event to pass an object instead of a string in AngularDart?

Issue Here’s what I’m trying to accomplish. <select (ngModelChange)=”addChild($event)”> <option>Add</option> <option [value]=”null”>New Item</option> <option *ngFor=”let child of menuItem.children” [value]=”child”> {{child.title}} </option> </select> While it compiles, the addChild method is not called. VSCode is reporting that “The bound output ngModelChange does

Continue reading

Access elements in Angular Dart

Issue I have a top level element <x-app> with nested modal dialogs <x-app> <material-content> … </material-content> <x-alert-dialog></x-alert-dialog> </x-app> where <x-alert-dialog> contains <modal [visible]=”dlgVisible” dialog-id=”alert-dialog-modal”> <material-dialog class=”alert-dialog”> …. </material-dialog> </modal> Generated HTML contains <x-app> and overlay container div which contains modals

Continue reading

dart pub version conflicts

Issue I am trying to learn angulardart. I followed starter guide and using IDE intellij. After I have cloned the repo and then opened index.html in browser directly from intellij I am getting this error /usr/local/opt/dart/libexec/bin/pub global run webdev serve

Continue reading

Angular 2 Dart: How to share variables between parent with router and child components?

Issue How do I share variables if having a child component with a router and keep them updated through bindings? This is (part of) my code: app_component.dart: import ‘package:angular2/core.dart’; import ‘package:angular2_components/angular2_components.dart’; import ‘package:angular2/router.dart’; import ‘package:my_app/profile_component/profile_component.dart’; import ‘package:my_app/login_component/login_component.dart’; @Component( selector: ‘my-app’,

Continue reading

Dart2 Router Implementation

Issue I am trying to upgrade Dart1 application to Dart 2.4, I am facing a problem in Router my code is as shown below import ‘dart:async’; import ‘dart:convert’; import ‘package:angular/src/core/di/decorators.dart’; @Injectable() class SpRouterImpl implements SpRouter { final Router _router; SpRouterImpl(this._router);

Continue reading

App Layout with AngularDart does not show Item on Drawer

Issue I am trying reproduce the following App Layout Demo (app_layout_demo) example: https://github.com/dart-lang/angular_components_example/tree/master/lib/src/app_layout_demo There are these items that should appear in the drawer: <material-drawer persistent #drawer=”drawer” [attr.end]=”end ? ” : null”> <material-list *deferredContent> <div group class=”mat-drawer-spacer”></div> <div group> <material-list-item> <material-icon

Continue reading

How to output values from Material date range picker in angular dart

Issue How to get values from list of material-date-range-picker in angular dart? https://dart-lang.github.io/angular_components/#/material_datepicker <ul> <li *ngFor=”let rangeSimplified of datepickerComparisonList”> <material-date-range-picker compact [range]=”rangeSimplified”= [(minDate)]=”minDate” [(maxDate)]=”maxDate” [(outputDateFormat)]=”outputDateFormat” [required]=”true”> </material-date-range-picker> </li> </ul> I want to get an array of values of all periods

Continue reading

call async function from angular controller

Issue I want to call an async function from angular form template controller. But if I do so, execution hangs. Following the html template: <div class=”container”> <form> <div class=”form-group”> <label for=”address”>Identnummer (Adresse)&nbsp;*</label> <input type=”text” class=”form-control” id=”address” required placeholder=”0x” [(ngModel)]=”model.address” #address=”ngForm”

Continue reading

How to update HTML from async function?

Issue I need to call an async function. From this function a html field should be updated. In the following short example this would be {{typeStream | async}}. <div class=”container”> <form> <mark>{{typeStream | async}}</mark> <hr> <div class=”form-group”> <input type=”text” class=”form-control”

Continue reading

What does somecomponent.template.dart import in AngularDart point to?

Issue I am just reading the AngularDart routing tutorial and came across this code snippet. import ‘package:angular/angular.dart’; import ‘package:angular_router/angular_router.dart’; import ‘route_paths.dart’ as paths; import ‘crisis_list_component.template.dart’ as clct; import ‘hero_list_component.template.dart’ as hlct; @Injectable() class Routes { static final _crises = new

Continue reading

Material Design in Dart

Issue At the moment I can not find a somewhat up to date version of mdc for dart. I can find for example https://pub.dev/packages/mdc_web and https://github.com/dart-lang/angular_components but both are really far away from an up to date implementation of Material

Continue reading