             return defered.promise
 
         service.getWikiPage = (projectId, slug) ->
+            console.log $model.cls
             class WikiModel extends $model.cls
                 getUrl: ->
                     return "#{url(@_name)}#{@_attrs.project}-#{@_attrs.slug}/"
 
             _id = "#{projectId}-#{slug}"
-            return queryOne("wikipages", _id, {}, cls=WikiModel)
+            return queryOne("wikipages", _id, {project:projectId}, {},  WikiModel)
 
         service.createWikiPage = (projectId, slug, content) ->
             obj =

            defered = $q.defer()

            promise = $http(httpParams)
            console.log httpParams
            promise.success (data, status) ->
                defered.resolve($model(name, data))

            promise.error (data, status) ->
                defered.reject()


            return defered.promise

        queryOne = (name, id, params, options, cls) ->
            defauts = {method: "GET", headers:  headers()}
            current = {url: "#{url(name)}#{id}/", params: params or {}}

