Sha256: a273a83732d217e204d06f62e60189d743aac5602d6264b2122808c16443fb06

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

root = global ? window

angular.module("<%= @plural_model_name %>", ["ngResource"]).factory "<%= @model_name %>", ($resource) ->
  <%= @model_name %> = $resource("/<%= @plural_model_name %>/:id",
    id: "@id"
  ,
    update:
      method: "PUT"

    destroy:
      method: "DELETE"
  )
  <%= @model_name %>::destroy = (cb) ->
    <%= @model_name %>.remove
      id: @id
    , cb

  <%= @model_name %>

root.angular = angular

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
explainer_angularjs_scaffold-0.0.21 lib/generators/angularjs/scaffold/templates/plural_model_name.js.coffee