Closed ghost closed 4 years ago
I see these lines in the stack trace:
package:pg_client/src/pages/galley_new_component.dart 27:27
..
package:pg_client/src/pages/galley_new_component.dart 26:21
What do you have in gallery_new_component.dart? Also what do you see in the Network panel?
gallery_new_component.dart:
import 'package:angular/angular.dart';
import 'package:angular_router/angular_router.dart';
import 'package:pg_client/src/common/gallery_from/gallery_form_component.dart';
import 'package:pg_client/src/models/gallery.dart';
import 'package:pg_client/src/service/gallery_service.dart';
@Component(
selector: 'gallery-new',
template: '''
<div class="row">
<div class="col s12">
<h3>Add new Gallery</h3>
</div>
</div>
<gallery-form (onUpdate)="updateGallery"></gallery-form>
''',
directives: [GalleryFormComponent],
providers: [ClassProvider(GalleryService)]
)
class GalleryNewComponent {
GalleryNewComponent(this._galleryService, this._router);
final GalleryService _galleryService;
final Router _router;
void updateGallery(Gallery gallery) async {
await _galleryService.updateGallery(gallery);
await _router.navigate('/');
}
}
What do you see in the Network Panel?
I have found the error:
Sorry I have wasted your time, it was a silly mistake, I put an https in the base url in gallery_service.dart instead of http
I am on part 6 btw
Code for gallery_service.dart
Code for gallery controller.dart
Code for the gallery.dart for pg_server:
Code for gallery.dart for pg_client: