問題タブ [ember-cli]
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.
ember.js - Ember.js はルートなしで子コントローラーを作成します
取得する記事の数を制限する子コントローラーを作成しようとしています。アイデアは、そのようなものを持つことです:
Ember と Ember-CLI を使用した最初の実際のプロジェクトなので、まだ概念を消化中です。
これは、これまでの様子です。
models/home.js
models/home-section.js
models/home-article.js
ルート/home.js
テンプレート/home.hbs
template/home/sections.hbs
をどこで作成しますかHomeSectionController
。正しいcontrollers/home-section.js
命名構造はありますか?
どうもありがとう、
H
アップデート:
私の疑問は、ルートのない子コントローラーに関するもので、ember-cli とはあまり関係がありませんでした。とにかく、ここで良い議論を見つけましたhttp://discuss.emberjs.com/t/parent-child-controller-relationships-without-using-routes/761/19以前の質問のいくつかに答えています。
twitter-bootstrap - Ember.JS ember-cli アプリにブートストラップ ライブラリを含めるための推奨される方法
現在の ember-cli プロジェクトに Twitter Bootstrap を適切にインストールしようとしています。bower でブートストラップをインストールしました:
現在、ライブラリは/vendor/bootstrap/dist/(css|js|fonts) にダウンロードされています。ここに記載されていることを試しました: http://ember-cli.com/#managing-dependencies パスと css ファイル名を置き換えますが、Brocfile.jsファイルに関するエラー。例に比べて brocfile のフォーマットが変わりすぎていると思います。
また、スタイルシートを /app/styles/ ディレクトリに移動した後、 /app/styles/app.cssファイルを @import しようとしました:
しかし、うまくいきませんでした。ファイルは真の開発サーバーに表示されます:http://localhost:4200/assets/bootstrap.css
誰かここに骨を投げてくれませんか?
どうも
編集 :
brocfile.js
ember.js - Ember Data での子レコードのフィルタリング
ArrayController内のオブジェクトの子レコードをフィルタリングできませんでした。
私のモデルの構造は次のようになります。
ショップには多くの商品があり、商品はショップに属しています。Ember.TextFieldに基づいて各親の子レコードをフィルタリングしたいと思います。正規表現を使用して、所有するプロパティに基づいて親レコードのみをフィルタリングする場合、フィルタリングは機能します。
編集
ここで promise を使用しようとしました (ソース: Filter child-records (hasMany association) with Ember.js ) が、この productSearchResults プロパティにはアクセスされないようです。ここからログ出力が得られません。テンプレートでは、filteredProducts をループしていますが、そこには何もありません。関連性がある場合、私は Ember 1.5.0 と Ember Data 1.0.0-beta.7+canary.b45e23ba を使用しています。
ember.js - Including dependencies with ember-cli
I am trying out ember-cli to get an ember project going, however I have previously relied on rails and the asset pipeline to compile all my js and (s)css for previous projects.
I admit a weak understanding of js build tools, so apologies if the question is basic: How can I see what dependencies are being compiled/included in the build? Specifically, I want to include both zurb-foundation and ember-leaflet in my project. I am not sure if they are there (at least the leaflet map is not showing up in the project --- using a basic example that worked with both rails and rail-eak).
The files (ember-leaflet, etc) are in the vendor directory of the project and were placed there thru bower install (I assume?); do I have to manually include them in the root bower.json file (currently they are not); is the order in bower.json important?
Thanks in advance.
DJ
ember.js - 名前付き amd とそのエクスポートを ember-cli にインポートする方法
ic-modalを ember-cli プロジェクトにインポートしようとしていますが、何らかの理由でこのエラーが発生し続けます:
Uncaught Error: <ic-test@view:toplevel::ember278> Handlebars error: Could not find property 'ic-modal-trigger' on object (generated application controller).
次のインポートステートメントがあります。
app.import('vendor/ic-styled/main.js');
app.import('vendor/ic-modal/dist/named-amd/main.js', {
'ic-modal': [
'ModalComponent',
'ModalFormComponent',
'ModalTriggerComponent',
'ModalTitleComponent',
'modalCss'
]
});
これについての助けは素晴らしいでしょうか?!
ember.js - API プロキシ サーバー
私はember-cliを使用しています。リモート サーバーを呼び出す必要があり、API を制御できず、CORS が API に設定されていません。
プロキシ サーバーのセットアップに苦労しています。理想的には、ember-cli に組み込まれているものを使用したいと考えています。プロキシ オプション「ember serve --proxy」を見たことがありますが、その使用方法がわかりません。
私は基本的にやりたい:
これを行うと、次のようになります。
nginxも調べていますが、これをローカルで設定する方法や、ember-cliサーバーで動作させる方法がわかりません。
どんな助けでも大歓迎です!
ありがとう