   routes: {}
 
   initialize: (options={}) ->
+    @router = options.router
+
     if not Backbone.History.started
       @prefix = options.prefix or ""
       if "*" in @prefix


          # is Routing Mixin?
          if index.views.MixinView.listMixins(view).indexOf(Routing) > -1
            @routers[url] = new view({router: @, prefix: prefix})

          # normal class based view
          opts = {router: @, viewClass: view, prefix: prefix}
          console.log ">>>", opts.prefix
          opts.namedParams = opts.prefix.match(/:([a-z\-\_]+)/gi)
          callback = @update.bind(@, opts)

        else if _.isFunction view
          callback = view
          console.log view

        else
          console.log "Nothing", view

        console.log @prefix + url, url, callback
        @_router.route(@prefix + url, callback)
        console.log Backbone.history
        # @routes[options.router] opts

  update: (options={}) ->
    console.log("updating", options.viewClass, options)
    reverse = options.reverse
    old = @view

    if old
      # notify the old view that it is being transitioned out
      Backbone.trigger "routing:closing",

    - routing:opening -- sent to Backbone before a view is created
    - routing:closing -- sent to old view, before it is closed
  ###

  # will prefix all routes
  prefix: null
