Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Mar 29 19:54
    micimize opened #251
  • Mar 29 19:54
    micimize opened #251
  • Mar 29 19:30
    micimize opened #250
  • Mar 29 19:30
    micimize opened #250
  • Mar 29 18:44
    micimize opened #249
  • Mar 29 18:44
    micimize opened #249
  • Mar 29 18:16
    micimize opened #248
  • Mar 29 18:16
    micimize opened #248
  • Mar 18 22:48
    massimoliani opened #247
  • Mar 18 22:48
    massimoliani opened #247
  • Mar 15 14:24
    thosakwe commented #244
  • Mar 15 14:24
    thosakwe commented #244
  • Mar 15 14:20
    massimoliani commented #246
  • Mar 15 14:20
    massimoliani commented #246
  • Mar 15 14:19
    massimoliani commented #246
  • Mar 15 14:19
    massimoliani commented #246
  • Mar 15 14:17
    thosakwe commented #246
  • Mar 15 14:17
    thosakwe commented #246
  • Mar 15 10:32
    massimoliani opened #246
  • Mar 15 10:32
    massimoliani opened #246
Tobe Osakwe
@thosakwe
Then by calling container.make<Repository>(), it will automatically insert the correct arguments
You just need to have a QueryExecutor singleton before creating the Repository instance
I just realized that the demo file doesn't have an example of this. But that is how Angel.mountController works
Omar BELKHODJA
@omarbelkhodja
By saying, "using dart:mirrors (or reflectable)", you mean the "reflector" parameter in var app = Angel(logger: logger, reflector: MirrorsReflector()); ?
Tobe Osakwe
@thosakwe
Yes
Omar BELKHODJA
@omarbelkhodja
OK, thanks. I will give it a try then :)
Tobe Osakwe
@thosakwe
But if you are in a situation where you cannot use dart:mirrors, there is angel_container_generator. It is currently undocumented.
Omar BELKHODJA
@omarbelkhodja
Omar BELKHODJA
@omarbelkhodja
But I didn't really understand it, before your explanations now.
I see the annotation @contained in the test file. Is it mandatory ?
Tobe Osakwe
@thosakwe
The documentation is needing improvement. At the time I wrote it, things made sense to me, but now I see that certain fundamental things are mostly glossed over, or not touched upon in full depth.
Yes, you will need @contained. There's also GlobalQuanityCapability, which you may need.
@contained is a specific constant Reflectable object. With package:reflectable, you need to use it as an annotation on any class you want to build reflection for
Ultimately, it's not super convenient, plus reflectable cannot properly reflect functions, so mirrors is preferable
In situations where you absolutely must use AOT, you can still use the container, as the core singleton/factory mechanism doesn't use reflection, but things will get more verbose
The ioc top level function does basically the same thing as controller methods - it uses the provided reflector to inject arguments into a function
Omar BELKHODJA
@omarbelkhodja
What I did right now : created the new MyRepository class, as described in the test file, with the executor as a parameter of the constructor, also added MyRepository as a parameter in the MyController class, and used await app.mountController<MyController>();
Using breakpoints, I can see that MyRepository and MyController instances are created
But the problem now, is that MyController is not handling HTTP requests anymore.
Any idea why ?
Before that, I was using app.configure(MyController().configureServer);
Omar BELKHODJA
@omarbelkhodja
Sorry, I think it is a mistake of mine : I have other routes, not in the controller, that was leading to a misbehavior in the routing.
Tobe Osakwe
@thosakwe
Ah ok
Kirill
@lobanovkirill
Hello guys! Does Angel have template engine? Or best practice use AngularDart for front-end? I'm newer in Dart)
Tobe Osakwe
@thosakwe
Kirill
@lobanovkirill
Wow!) Thank you for your fast answer!)))
Hmmmm... This link in documentation not working https://dart.academy/using-angel-with-angular2/
Fix this or maybe delete
Tobe Osakwe
@thosakwe
I don't have access to that site, maybe the article was deleted or the site format changed
It looks like dart.academy itself is no longer up
Tobe Osakwe
@thosakwe
Forgot this existed, but the predecessor to Angel: https://github.com/korat-dart/korat_framework
Kirill
@lobanovkirill
Interesting) I can build real-time app in Angel?🤔🙂
Tobe Osakwe
@thosakwe
Sorry for the inactivity - exam season
Kirill
@lobanovkirill
Good luck in exams!)))
zulin
@llinzzi
Hello guys,I have a question about ORM.
Tobe Osakwe
@thosakwe
Ask away
zulin
@llinzzi
How to define the model file, whith the case in User & User . Like the frinds of some user.
@thosakwe thank you for the great job, I love angel-dart framework.
Devin Moure
@DevinM4
@serializable
abstract class _User extends Model  {
  @ManyToMany(_Friends)
  List<_User> get users;
}

@orm
@serializable
abstract class _Friends {
    @belongsTo
    _User get user;
}
@llinzzi try
zulin
@llinzzi
@DevinM4 Thank you
Noah Osterhout
@NoahFlowa
Hello! Im interested in working with Angel-Dart. Im a little confused though, do you install it on an actual server and then have the app (client) communicate with it? Or does Angel-Dart just run a virtual server in the background for local storage? I guess what Im saying is, should I use Angel-Dart for a chat app where people can communicate with others?
Tobe Osakwe
@thosakwe
Angel is ultimately just a set of libraries (though you can get away with just using package:angel_framework). You'll install dart on a Web server, and after doing that, use pub get to install dependencies onto the server. Lastly, you'll need some sort of "executable" Dart file (typically named bin/main.dart or similar) that can be run in the background as a persistent task.
You don't necessarily have to run it in the background, though. While developing locally, you'll typically just run the executable file directly in a terminal.
Yes, you can use Angel for a chat app. You can use it for any kind of HTTP server at this point.
Noah Osterhout
@NoahFlowa
That’s awesome! Thanks for quick reply! @thosakwe
James
@u007

angel.bat init hello
Creating new Angel project in C:\james\www\hello...
Choose a project type before continuing:
Choose a project type before continuing:

1) Basic (Minimal starting point for Angel 2.x - A simple server with only a few additional packages.)
2) ORM (A starting point for applications that use Angel's ORM.)
3) GraphQL (A starting point for GraphQL API servers.)
4) Shared (Holds common models and files shared across multiple Dart projects.)
5) Shared (ORM) (Holds common models and files shared across multiple Dart projects.)

Oops, something went wrong: NoSuchMethodError: The method 'delete' was called on null.