Commit 64af86df authored by Randall Leeds's avatar Randall Leeds

Code style for DI in app.coffee

parent 39cd11da
...@@ -11,30 +11,30 @@ imports = [ ...@@ -11,30 +11,30 @@ imports = [
] ]
configure = ($routeProvider, $sceDelegateProvider) -> configure = [
$routeProvider.when '/editor', '$routeProvider', '$sceDelegateProvider',
controller: 'EditorController' ($routeProvider, $sceDelegateProvider) ->
templateUrl: 'editor.html' $routeProvider.when '/editor',
$routeProvider.when '/viewer', controller: 'EditorController'
controller: 'ViewerController' templateUrl: 'editor.html'
reloadOnSearch: false $routeProvider.when '/viewer',
templateUrl: 'viewer.html' controller: 'ViewerController'
$routeProvider.when '/page_search', reloadOnSearch: false
controller: 'SearchController' templateUrl: 'viewer.html'
reloadOnSearch: false $routeProvider.when '/page_search',
templateUrl: 'page_search.html' controller: 'SearchController'
$routeProvider.otherwise reloadOnSearch: false
redirectTo: '/viewer' templateUrl: 'page_search.html'
$routeProvider.otherwise
redirectTo: '/viewer'
if window.location.href.match /^chrome-extension:\/\// if window.location.href.match /^chrome-extension:\/\//
# XXX: This hack is awful. It shouldn't be necessary. # XXX: This hack is awful. It shouldn't be necessary.
# Angular should have the default 'self' work on extension pages. # Angular should have the default 'self' work on extension pages.
$sceDelegateProvider.resourceUrlWhitelist [ $sceDelegateProvider.resourceUrlWhitelist [
'self' 'self'
'.*' '.*'
] ]
configure.$inject = ['$routeProvider', '$sceDelegateProvider']
angular.module('h', imports, configure) angular.module('h', imports, configure)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment