Skip to content

yo meanjs:crud-module <module-name> - create fails #258

Open
@dhagan

Description

@dhagan

After generating am module the call to $resource.save() fails - the path to the api - http://localhost:3000/api/module-name/create/module-name POST fails with 404 for the obvious reason, the trailing /module-name

The workaround to this is to clone the articles.client.service.js code -

` angular.extend(Article.prototype, {
createOrUpdate: function () {
var article = this;
return createOrUpdate(article);
}
});

return Article;

.
.
.
`

into your module.

Can someone confirm the module-name.client.controller.js :: vm.module-name reference to the service is being corrupted?

Thanks to the team who is maintaining the mean.js stack - I rely on it heavily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions