問題タブ [meanjs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
3905 参照

javascript - クライアント コントローラー (MEAN.JS) からの Mongo クエリ パラメーターの指定

MongoDB、Angular、Express、および Node (MEAN スタック) を使用してアプリケーションを構築しています。

MEAN.JS ジェネレーターを使用してアプリケーションを足場にしました。

記事モジュールを参考にします。

記事のコレクションに 7000 件のレコードがあり、各レコードに日付が関連付けられているとします。テーブル内のレコードを表示するためにページをロードするたびに 7000 レコードすべてをメモリにロードするのは非効率的であり、そのためにひどいパフォーマンスの低下が見られます。このため、(1 か月前) から (1 年後) の範囲の日付のレコードのみを読み込み、テーブルに表示したいと考えています。現在、次の方法でこれを行うことができます。

私の article.client.controller.js では:

...そして私のarticles.server.controller.jsでは:

問題は、これが動的な方法ではないことです。言い換えれば、ユーザーがどれだけ前に、どれだけ前に見たいかを指定できるようにしたいのです。

サーバー コントローラのクエリ パラメータを変更するクライアント ビューの変数 (「aYearFromNow」や「aMonthAgo」など) にバインドするにはどうすればよいですか?

0 投票する
1 に答える
1143 参照

node.js - generic Error handler MEANJS, mongoose, winston

so I've recently started programing in node and MEAN and while working with JAVA I would always focus on best pattern to create solid apps, and even though the learning curve is killing me I'm trying the same here. Anyway I'm trying to implement a generic error handler using MEANjs to have an exception handler in a central place, log errors to a file and send email when this happens.
starting with mongoose for example

this is the handler in express.js :

so here is where it gets confusing since I'm trying to implemente a middleware with express I'm not sure if app.use is the best aproach, I've read that sometimes is not the best aproach, or this is just for Express 3.xx?? what about express 4? below is what I'm using for the logger file and then using it before the express error handler is this good practice or it should go inside the handler?

So landing this. is there a way to have a general errors handler via express 4 using MEANJS sending emails when they happen logging into a file. and get rid of all this repetitive mongoose errors handling keeping in mind best practices for MEANJS.

0 投票する
1 に答える
389 参照

configuration - meanjs を cloud9 IDE にデプロイする

スタック meanjs で開発を始めています。Cloud9 をクラウド IDE として使用しています (そのチーム機能が必要です)。以前、ローカル マシンに mean を正常にインストールしようとしました。cloud9 ワークスペースにインストールしようとすると、問題が発生します。誰もそれを行う方法を知っていますか? これhttps://github.com/meanjs/mean/issues/4を試しましたが、うまくいきません。

よろしくお願いします。

0 投票する
3 に答える
2613 参照

angularjs - meanjs が管理ダッシュボードを実装する方法

meanjs はフロント エンド mvc に angularjs を使用し、SPA アプリケーションであるため、管理ダッシュボードがフロント エンド ページとは異なる場合、管理ダッシュボードを実装する最良の方法は何ですか? おそらく2つのアクセスポイント?

0 投票する
3 に答える
614 参照

javascript - MeanJS - Angular を index.html ファイルに統合する

私は LAMP のバックグラウンドを持っており、学習プロジェクトとしてMEAN.JSをダウンロードして、MEAN スタックに飛び込むことができるようにしました。すべて実行しましたが、何かが足りないような気がします...

http://meanjs.org/generator.htmlのすべての手順に従い、Mongo を実行し、サーバーを実行しました。index.html ファイルは localhost:3000 に読み込まれ、問題はありません。

だから私の心の中で、私はチェックリストを下ります...

MongoDB - チェック (mongod.exe の実行後に実行)。

ノード - チェック (サーバーは grunt の実行後に実行されます)。

Express - チェックします (サーバーとしてノードに関連付けられています)。

角度 - ....??

MEAN.JS をインストールすると、Angular 用にいくつかのフォルダーがインストールされていることがわかりますが、私の index.html ファイルが魔法のように Angular 用に「機能」しているとは思いません。実際、Angular を機能させるには、 head 要素で古き良き方法でそれを行う必要がありました。

では、MEAN.JS は実際にここで何をしたのでしょうか? この方法ではない場合、どのようにAngularを統合する必要がありますか? ここで何か助けていただければ幸いです。

ありがとう!