Sha256: 84872d095d03dc993d91fb12cd9af4dcac015b160d934d6a87f173f7103b439e

Contents?: true

Size: 702 Bytes

Versions: 1

Compression:

Stored size: 702 Bytes

Contents

# TODO find better solution for breadcrumbs
class BreadcrumbsCtrl
  @$inject = ["$rootScope", "$scope"]
  constructor: (@$rootScope, @$scope) ->
    @$scope.showDatabase = => @$scope.dbName
    @$scope.showCollection = => @$scope.collectionName

    @$rootScope.$on "$routeChangeSuccess", (scope, route) =>
      @$scope.dbName = route.params.dbName
      @$scope.collectionName = route.params.collectionName

      if @$scope.dbName
        @$scope.database =
          name: @$scope.dbName

        if @$scope.collectionName
          @$scope.collection =
            dbName: @$scope.dbName
            name: @$scope.collectionName

angular.module("mb")
  .controller("breadcrumbs", BreadcrumbsCtrl)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo_browser-0.2.5 app/assets/javascripts/app/controllers/breadcrumbs_controller.js.coffee