Skip to content

Yo generator CRUD module routing #276

@atulkumar1234

Description

@atulkumar1234

I'd been facing this issue of getting a blank list on returning from the item view page back to the list page. I always had to refresh the page to get the list again.
After struggling for the whole day, i finally found what exactly the issue was.

In, for example blog.client.routes.js file located in modules/blog/client/config directory, there are state route templateUrls that are starting from 'module/blog/client/views...' , there should be a slash '/' before the URL like '/modules/blog/client/view/...'

and the same slash '/' issue was resided in the blogs.client.service.js file located in \modules\blogs\client\services directory, which should have a '/api/blog/:blogId' instead of 'api/blog/:blogId' in the return statement of the service function.

Due to this addition of slashes, when the navigation is back tracked, the correct view and APIs are called.

As a suggestion to the MEANJS team, this should be done by the yo generator itself.

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