Questions tagged [angular-dart]

AngularDart is a web app framework that focuses on productivity, performance, and stability.

AngularDart is a web-app framework for creating structured web applications in Dart.

AngularDart is distinct from Angular. It shares concepts and some API, but differs in implementation – taking advantage of Dart features such as classes and annotations.

Features

  • Reusable components
  • Bind models (Dart classes) to HTML markup
  • Deep linking
  • Form validation
  • Dependency injection
  • Testable

Links

1298 questions
5
votes
4 answers

querySelector does not seem to find elements inside ng-container

I am developing a web application using angular dart. I am trying to find a 'div' element inside the component using document.querySelector() and I am trying to modify(add some content to) its body. But it doesn't seem to find the 'div' element.…
Sabareesh
  • 711
  • 1
  • 7
  • 14
5
votes
1 answer

angular dart js interop with async / promise awaited in client

clientside.js async function callClientAsyncFuncWithResult () { let result = await someService.request(); return result; } page.dart import 'dart:js' as js; var result = js.context.callMethod('callClientAsyncFuncWithResult'); //I want…
james
  • 408
  • 7
  • 22
5
votes
3 answers

What is the difference and preferred way between jsonEncode() and json.encode() in Dart?

In Flutter doc, it uses jsonEncode(), while in Angular doc, it uses json.encode(). What is the difference and preferred way between the two?
sgon00
  • 4,879
  • 1
  • 43
  • 59
5
votes
2 answers

Can enums be used in AngularDart templates? How?

If I have an enum, e.g: @Component(...) class MyComponent { MyEnum myEnum; ... } How can I use this enum in a template? E.g.
...
Edit: I'm specifically interested in how to use enums…
GreyScreenOfMeh
  • 273
  • 1
  • 11
5
votes
1 answer

Dart - getting start - missing step - how to install pub

I'm trying to get started and setup to develop Dart. I'm following the instructions on https://webdev.dartlang.org/guides/get-started to install on Linux. However there seems to be an essential step missing. On the above link, step 2 is about…
Magick
  • 4,603
  • 22
  • 66
  • 103
5
votes
1 answer

webdev serve missing output for .js.map files

When running webdev serve and attempting to debug an error. I do not see any dart source code or .js.map files in order to debug it. What could be wrong? This is a fresh angulardart project using the latest Dart 2, and webdev 0.2.4
Daniel Fischer
  • 3,042
  • 1
  • 26
  • 49
5
votes
2 answers

webdev error when ran without pub on windows

I do AngularDart development on Windows 10. I'm getting strange behavior with webdev recently. I have to run webdev like this: C:\Users\galankus>C:\tools\dart-sdk\bin\pub.bat global run webdev A tool to develop Dart web projects. Usage: webdev…
Gazihan Alankus
  • 11,256
  • 7
  • 46
  • 57
5
votes
2 answers

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

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…
Tobias Marschall
  • 2,355
  • 3
  • 22
  • 40
5
votes
2 answers

Stop ngAfterContentInit from executing twice

I'm a bit confused as to why ngAfterContentInit is executing twice in this scenario. I've created a stripped-down version of our application to reproduce the bug. In short, I make use of a *contentItem to tag components which is then picked up by…
Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
5
votes
1 answer

Dart, float for loop will cause strange result

for(int i=0; i<10; i++) { priceValue.add(54.99 + i*5); print(54.99 + i*5); } Result: js_primitives.dart:30 54.99 js_primitives.dart:30 59.99 js_primitives.dart:30 64.99000000000001 js_primitives.dart:30…
Charles
  • 91
  • 6
5
votes
1 answer

Angular Change Detection and list references

Does it matter to Angular if in every digest cycle I return a new list with the same contents vs returning the same list instance? This is assuming default change detection, not OnPush.
Dandan
  • 519
  • 2
  • 9
5
votes
3 answers

Routing doesn't work for me when doing a hard refresh

I was looking at this source code: https://github.com/angular/angular.io/blob/master/public/docs/_examples/toh-5/dart/lib/app_component.dart and it seems that my application will route right now when i go to the root. localhost:8080/ The routing…
Fallenreaper
  • 10,222
  • 12
  • 66
  • 129
5
votes
2 answers

Routing in angular2 with Dart

I'm new to Angular2, till now I got succeeded to write the 5 Min Quickstart. I want to learn how to use routing in Angular2 and Dart, unfortunately I couldn't find any example on the web yet. most of the articles are talking about routing with…
Murhaf Sousli
  • 12,622
  • 20
  • 119
  • 185
5
votes
2 answers

Ng-click No getter for 'clickHandler' in AngularDart

Trying to get a simple click handler working, and it's proving to be quite frustrating. The application is just a test application to try out different Angular.Dart features. - Using Dart 1.6 and Angular 1.0 and running in Dartium - Clicking the…
Faisal Abid
  • 8,900
  • 14
  • 59
  • 91
5
votes
1 answer

Is there something like jsfiddle.net for Angular Dart?

Does anybody know an online service like jsfiddle.net, but for Angular Dart Code?
forgemo
  • 4,634
  • 5
  • 22
  • 25