Please sign in to comment.
start to break apart the Hypothesis controller
- Break Hypothesis down into App and Viewer controllers (Auth was factored out earlier) - Break the XDM pieces and the bulk of what used to be the main subclass of Annotator into a service, since the annotator services, inside the iframe, is only every a singleton anyway. This distinguishes the service from the highlight providers a bit. Eventually, multiple "annotators" on the host page could communicate with the same service (in the iframe) or, in the case of a browser extension, the service can be in the background page app context. - Use the $location provider for routes and hook it up to the viewer so that detail is triggered by a route parameter. This will let our back functionality be implemented by browser history and could prove useful as well as sensible.
- Loading branch information...
Showing with 542 additions and 689 deletions.
|@@ -1,8 +1,19 @@|
|-angular.module 'h', [|
|+imports = [|
|+configure = ($routeProvider, $locationProvider) ->|
|+ $routeProvider.when '/app/viewer',|
|+ controller: 'Viewer'|
|+ reloadOnSearch: false|
|+ templateUrl: 'viewer.html'|
|+configure.$inject = ['$routeProvider', '$locationProvider']|
|+angular.module('h', imports, configure)|
Oops, something went wrong.