Thomas,
first, it would be helpful to post in English to maximise the chance to get
a response.
Second, and even more important you are unlikely to get a response if you
are not providing any idea on the client code. Just posting the server side
code does not help. The server side as such looks ok, at least for the part
provded. Simply check your server API with postman or similar tools to
eliminate any server issues.
--tomw
On Sunday, December 28, 2014 12:58:08 PM UTC+1, Thomas Handle wrote:
>
> Hallo zusammen,
>
> dies ist mein erster Eintrag hier. Habe gerade begonnen, mich in die oben
> genannten Themen einzuarbeiten und brauche eure Unterstützung. Ich habe ein
> Model erstellt:
>
> var mongoose = require('mongoose');
> var Schema = mongoose.Schema;
>
> var ArticleCategory = mongoose.model('ArticleCategory', {
> DisplayName: String, //
> Published: Date,
> commentsAllowed: Boolean,
> Visibility: Boolean,
> AutorID: {type: Schema.ObjectId, ref: 'User'},
> ModificationDate: Date,
> ModificationCounter: Number,
> LastModificationBy: {type: Schema.ObjectId, ref: 'User'}
> });
>
>
>
> und in meiner routes.js anschließend ein
>
> module.exports = function (app, passport) {
>
> app.get('/api/article_categories', function (req, res) {
> ArticleCategory.find(function (err, article_categories) {
> if (err) {
> res.send(err);
> }
> res.json(article_categories);
> });
> });
>
> });
>
>
> Wenn ich jetzt aber die Seite über localhost/api/article_categories lade
> erhalte ich nur ein leeres [ ].
> Keine Einträge im Error-Log...
>
> Woran liegts? Was mache ich evtl. falsch?
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.