Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
web
 
 
 
 
 
 
 
 
 
 
 
 

Sponge client example for an AngularDart web app

The example of the Sponge client for Dart in the AngularDart web application.

Created from templates made available by Stagehand under a BSD-style license (see https://webdev.dartlang.org/guides/get-started) and modified to show how to use the Sponge client. The modifications include:

  • Adding the sponge_client_dart dependency and dependency override for quiver in the pubspec.yaml.
  • Adding a new SpongeService class in the lib/src/todo_list/sponge_service.dart.
  • Adding the Sponge Service DI provider and the spongeService property in the lib/src/todo_list/todo_list_component.dart.
  • Adding the Sponge action call in the add() method and changing this method to async in the lib/src/todo_list/todo_list_component.dart.
// The Sponge action call.
items.add(await spongeService.client.call('UpperCase', [newTodo]));

The only change to the source web app is that all list items will be upper case. Note that in this simple example there is no exception handling. If the app doesn't work as expected, please see the JavaScript console.

For more information on Sponge see https://sponge.openksavi.org.

About

The example of the Sponge client for Dart in the AngularDart web application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published