Closed victor7w7r closed 1 year ago
Can you try with Angel(reflector: MirrorsReflector()
?
Can you try with
Angel(reflector: MirrorsReflector()
?
Same error
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
@Expose('/controller')
class MyController extends Controller{
@Expose('/')
a() => "Hello, world!";
}
void main() async {
//initializeReflectable();
var app = Angel(reflector: MirrorsReflector());
var http = AngelHttp(app);
await app.mountController<MyController>();
var server = await http.startServer();
print("Angel server listening at ${http.uri}");
}
Bad state: No element
Bad state: No element
dart:core List.first
package:angel3_framework/src/core/driver.dart 128:24 Driver.handleRawRequest.<fn>.<fn>.handle.resolveTuple
package:angel3_framework/src/core/driver.dart 136:17 Driver.handleRawRequest.<fn>.<fn>.handle
dart:async _CustomZone.run
package:angel3_framework/src/core/driver.dart 243:25 Driver.handleRawRequest.<fn>.<fn>
There is two ways to resolve this error
app.container.registerSingleton<MyController>(MyController());
await app.mountController<MyController>();
or
await app.configure(MyController().configureServer);
Internally it is calling registerSingleton
and mountController
.
Hi, in my app i have a simple code for getting started
At request in the browser, the logger prints the next messages
My Dart SDK is 2.18.6, I should ignore it? thank you for the pacience.