Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
borisgappov
@borisgappov
Hi All 👋
I have an application with a huge number of files (about 65 megabytes) and in debug mode the application loads on average 10 minutes in Chrome. I bought a multi-core processor but it doesn't help. On the new processor, the page load was reduced to 1 minute, but only in Firefox because the debugger is not connected and only if there were no changes in the code. Has anyone done parallelizing file downloads in Chrome in debug mode?
Randal L. Schwartz
@RandalSchwartz
this is all being loaded as an angular payload? /me is confused
borisgappov
@borisgappov
yes
there is a lot of generated code for communication with the backend. unfortunately I cannot change the architecture of the application
Randal L. Schwartz
@RandalSchwartz
Yeah, I’m surprised it even works!
so you have a 65 MB main.dart.js ?
borisgappov
@borisgappov
1 min
65 Mb of not minified files
minified (release) size is 26 Mb
main.dart.js is 24 Mb, page load time is 12.8 sec
Randal L. Schwartz
@RandalSchwartz
I wonder if you could refactor the different pages or pagegroups into separate sites, perhaps boxed by an iframe?
I highly suspect you won’t need all 24MB of your .js in any given run. :)
and I’m sure you meant megabytes not megabits
borisgappov
@borisgappov
I would never allow such a size of the application, but I inherited this app as is ) and the team lead most likely will not allow to change the architecture.
In addition, if the file is cached, the page opens quickly and this is not a public site, it is something like a CRM.
And I need to somehow solve this problem. If the debugger supported multithreading, there would be no problems, I have 12 cores in the processor )
borisgappov
@borisgappov
Ok, I found solution. It is so simple, I don’t understand why such a simple idea didn’t occur to me before.
I temporary commented out all the routes and component's references currently not in development.
The page loaded in 6 seconds! instead of 85 seconds...
Randal L. Schwartz
@RandalSchwartz
Woo hoo!
GTMS
@gtms_gitlab
We are using it in our app.. What do you mean by try? @kevin-lot
Rebecca Manning
@bmanning1
Hi all,
Just making a practise calculator app with 2 main components (Screen, Keyboard) and a service containing the value to display on the screen (as well as functions for the keyboard). How do I get the Screen to display the value from the service whenever it is updated?
Oh my God. I do not believe that! I chose Aqueduct and the angular dart for an important project. Both were orphaned.
Marcio Alencar
@marciotrix77_gitlab
"..we recommend migrating your projects to a different platform. We’re seeing promising things in the Kotlin/Springboot community" by Joe Conway.
Jonathan Rezende
@jodinathan
shelf for server stuff is there and AngularDart is pretty solid
we do use Aqueduct and AngularDart in production and is being pretty good so far. We may change Aqueduct for shelf when we migrate to null-safety, but it is not confirmed yet
Mitai
@MitaiGit
@marciotrix77_gitlab It's just that the angulardart product did not receive the attention of a large number of developers, apparently this was the reason that it was abandoned, and here you need to understand that they did not do anything to make it popular, flutter created a boring show, a widget of the week, a huge number of videos and articles from developers where everything is told in detail
what was done with angulardart. We took a tour of heroes (a very unfortunate example for a web framework) and that's the end of what efforts we made and got the result...
Randal L. Schwartz
@RandalSchwartz
Yeah, tour of heroes is so much more fun in Flutter-web. :)
Thomas Hii
@dukefirehawk
I often poke around in angular TS tutorial to learn about how some of the angular directive works. Works so far :)
Joshua Immanuel
@joshuaimmanuel
@marciotrix77_gitlab We are also in similar situation. Luckily, we didn't use Aqueduct. We have an ongoing large project which uses AngularDart on the client side. Migrating this to AngularTS would be another one year of development for us. So, for now we are using AngularTS for new code keeping the old AngularDart client along.
worookie
@worookie

In the tutorial here:
https://angulardart.dev/guide/user-input#put-it-all-together

The sample code (excerpt) below is obsolete:

<input #newHero
      (blur)="addHero(newHero.value); newHero.value='' ">

The code will cause this error:
"Event bindings no longer support multiple statements"

The workaround I found is to rewrite the function addHero() to take an InputElement like this:

void addHero(InputElement target) {
  // add hero blah blah
  target.value = '';
}

However, the whole section in that tutorial is teaching us not to pass in any DOM Element.
Is there any better solution?

Hadrien Lejard
@hashes:matrix.org
[m]
@worookie: The best solution to me would be to use $event
(blur)="addHero($event)"
void addHero(Event event) {
  // add hero blah blah
  event.target.value = '';
}
worookie
@worookie
Hi Hadrien,
Thanks for the response. But the main point of my question is to find a solution that avoids passing the $event object (which contains the DOM object).
The tutorial (as referenced earlier) is teaching us:
"Passing $event is a dubious practice".
See:
https://angulardart.dev/guide/user-input#passing-event-is-a-dubious-practice
Patrick Minogue
@afpatmin

you can bind a variable to the input using ngModel

@Component(
   ...
   directives: [formDirectives, ...],
   ...
)
class MyComponent {
   ...
   String myHeroName;
   void addHero() {
     // add hero here using bound variable "myHeroName"

     // done, reset the hero name
     myHeroName = '';
   }
   ...
}
<input [(ngModel)]="myHeroName" (blur)="addHero()" />

@worookie

worookie
@worookie
Patrick's solution is awesome and simple!
Patrick Minogue
@afpatmin
glad I could be of some help :)
worookie
@worookie

Is anyone able to get pageloader to work nowadays?

I am learning Page Loader from the official tour guide and got stuck at:
https://angulardart.dev/guide/testing/component/page-objects#pubspec-configuration

There is always some kind of version conflict when trying to add the "pageloader" dependency to the pubspec.yaml file.
I know the angulardart site is historical, but would like to know if anyone is still able to use "pageloader".

My original questions can be simplified to:
What version of pageloader do you use?

Giorgio
@giorgiofran
any new about the null-safety version?
Dao Ngo
@dngo10
Just saw some updates on Angular Components (˵ ͡° ͜ʖ ͡°˵)
Oh... 8 days ago...
Thomas Hii
@dukefirehawk
Hope to see NNBD version of Angular soon
Hadrien Lejard
@hashes:matrix.org
[m]
NNBD version is here https://github.com/angulardart/angular/tree/google (don't know if it's ready)
Not a lot of commits but last update was 20 hours ago
Giorgio
@giorgiofran
yes, but if you look at the pubspec dependencies, it seem to be still a test version
GTMS
@gtms_gitlab
Good question :)
flutterdocteur
@flutterdocteur
Hello all my AngularDart fellows ! I don't know if there are a lot of Frenchies like me here but I just want to let you know that I'm starting a modest AngularDart tutorials channel on YT : https://www.youtube.com/watch?v=spPVKtsqxm4&list=PLO7bFwSmaujYPbVMbF7jMnlMb1JupPoqF I'm just a beginner so any help would be welcome ;). And please keep making this super framework more and more aknowledged
Dao Ngo
@dngo10_gitlab

Oh my God. I do not believe that! I chose Aqueduct and the angular dart for an important project. Both were orphaned.

I quoted a comment up there for you. To be cleared it's not abandoned, there are updates occasionally. However, users are not active. They put most effort for Flutter.

Mitai
@MitaiGit
this is the main disadvantage of Google products, you learn them, love them with all your heart, and one day you read that blah-blah technology is no longer a priority, or even sent to the cemetery of dead projects
Mitai
@MitaiGit
so when you read the news that Google has released a super duper cool blah-blah, you're like, " no thanks, no need, anyway, in half a year, you'll kill him"
eftikhar
@eftikharEmad

Hello
I am getting experimental related error once I try to pub get or pub serve, I am not sure how this happened, after it was working fine

environment:
 sdk: '>=1.24.0 <2.0.0'
dependencies:
  angular: ^4.0.0
  angular_router: ^1.0.2
  angular_forms: ^1.0.0
..
...
dev_dependencies:
  browser: ^0.10.0+2
  dart_to_js_script_rewriter: ^1.0.3
  dart_style: any
transformers:
- angular:
    entry_points:
    - web/main/main.dart
- dart_to_js_script_rewriter
- $dart2js:
    commandLineOptions: [--show-package-warnings]

I am getting something like

xxxxxxxxxx$ pub get
Resolving dependencies...
Got dependencies!
Precompiling dependencies...
Loading source assets...
Loading angular transformers...
[BuilderTransformer: Instance of 'LibraryBuilder' on angular|primary]:
Error running TemplateGenerator for angular|lib/experimental.dart.
Error: Bad state: Could not resolve @get experimental → _Experimental. An import or dependency may be missing or invalid.
Stack Trace:
#0      TypeChecker._computeConstantValue (package:source_gen/src/type_checker.dart:99)
#1      TypeChecker.annotationsOfExact.<anonymous closure> (package:source_gen/src/type_checker.dart:122)
#2      MappedListIterable.elementAt (dart:_internal/iterable.dart:413)
#3      ListIterator.moveNext (dart:_internal/iterable.dart:342)
#4      WhereIterator.moveNext (dart:_internal/iterable.dart:437)
#5      Iterable.isEmpty (dart:core/iterable.dart:383)
#6      TypeChecker.firstAnnotationOfExact (package:source_gen/src/type_checker.dart:84)
#7      ReflectableReader.resolve.<anonymous closure> (package:angular_compiler/src/analyzer/reflector.dart:121)
#8      WhereIterator.moveNext (dart:_internal/iterable.dart:438)
#9      MappedIterator.moveNext (dart:_internal/iterable.dart:390)
#10     List.addAll (dart:core-patch/growable_array.dart:197)
#11     ReflectableReader.resolve (package:angular_compiler/src/analyzer/reflector.dart:120)
<asynchronous suspension>
#12     processTemplates (package:angular/src/source_gen/template_compiler/template_processor.dart:46)
<asynchronous suspension>
#13     TemplateGenerator.generate.<anonymous closure> (package:angular/src/source_gen/template_compiler/generator.dart:29)
<asynchronous suspension>
#14     _rootRun (dart:async/zone.dart:1120)
#15     _CustomZone.run (dart:async/zone.dart:1001)
flutterdocteur
@flutterdocteur
Hi DaoNgo and Mitai, if it was for me I want first to thank you for your feedback + don't fear I've read a lot of comments saying the AngularDart project is running slowly and shifting more to Flutter (which I see as a bad news as it's something very different to my point of view, and Flutter attraction leads to AngularDart so...). Whatever, if somebody is IN to make AngularDart more trendy I'm very likely to help. Thanks guys ;)