Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Can not found api #1799

Closed
GinVlad opened this issue Jun 21, 2017 · 4 comments
Closed

Can not found api #1799

GinVlad opened this issue Jun 21, 2017 · 4 comments

Comments

@GinVlad
Copy link

GinVlad commented Jun 21, 2017

Hello, i used command yo meanjs:crud-module to create articles CRUD. But when i click to create post, meanjs can not found link POST http://localhost:3000/articles/api/articles 404 (Not Found)

And how to render html data with meanjs

@billyjov
Copy link

billyjov commented Jun 21, 2017

@GinVlad you choose the wrong link to find the api.

as i can see here articles/server/routes

you need following url instead http://localhost:3000/api/articles/

@mleanos
Copy link
Member

mleanos commented Jun 21, 2017

@billyjov Is correct.

The MEANJS Generator is out of syc with the current master branch. We moved away from using a <base> tag in our Layout template. See #1544

@GinVlad In order to fix this issue you will need to prefix your API end-points from your client-side services with a /. See the articles service. There may be other instances where you need to add the "/" to. The above mentioned PR should be a good guide to reconcile the differences.

Unfortunately, the generator project isn't well maintained at this point. Any help in that regard would be much appreciated. As it stands the best way to create a new CRUD module would be to copy the modules/articles folder from a project that was cloned from master.

@GinVlad
Copy link
Author

GinVlad commented Jun 22, 2017

Thank you, it worked :)

@GinVlad GinVlad closed this as completed Jun 22, 2017
@GinVlad
Copy link
Author

GinVlad commented Jun 22, 2017

I tried install angular-sanitize but can not work. Then i upgrade angular to 1.6.4 and when reload page, it render to blank page with error. How to install angular-sanitize to MEANJS ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants