![](/img/trans.png)
[英]Calling a JS functions from another JS file in EmberJS
我目前在 emberJS 工作,我需要在 app/components/mycomponent.js 的 public/myjs.js 中的 JS 文件中調用 function。 它說找不到名為 public/myjs.js 的模塊在 app/component/mycomponent.js 中,這 ...
[英]Calling a JS functions from another JS file in EmberJS
我目前在 emberJS 工作,我需要在 app/components/mycomponent.js 的 public/myjs.js 中的 JS 文件中調用 function。 它說找不到名為 public/myjs.js 的模塊在 app/component/mycomponent.js 中,這 ...
[英]How to remove element from dom after few seconds in ember
我只想顯示此元素 5 秒,然后需要從 dom 中刪除。 請幫我解決。 我不知道如何實現這一目標。 ...
[英]Can I use ReactJs, EmberJs and ASP.NET MVC together?
我有一個使用 Ember 的 ASP.NET MVC 應用程序。 基本上,ember 應用程序被編譯並構建到純 Js 中。 已編譯的 js 腳本添加到其中一個視圖頁面中。 頂層布局是用 ASP.NET MVC 編寫的,即header ,帶有 ember 腳本的視圖被渲染為主體。 現在我想在 Rea ...
[英]Mirage server GETs data but POST fails
我有海市蜃樓模型:// mirage/models/country.js import { Model, belongsTo, hasMany } from 'miragejs'; export default Model.extend({ name: '', iso3166_1_ ...
[英]Resolving sub-dependencies fails for some packages
對於某些 npm 包(我還沒有弄清楚原因),構建在嘗試解析傳遞依賴項時失敗。 例如,googleapis 會發生這種情況。 這是我的 ember-cli-build.js: 這是錯誤 output: ...
[英]How do i get the ember-concurrency ajax-throttling example to work in my dev environment?
我的問題是,我需要修復什么才能使我的 ember-concurrency Ajax 節流示例的實現按預期工作。 具體來說,在我的實現中沒有顯示日志條目(因為它們在示例頁面上),並且我在loopingAjaxTask內部 function 中添加的 console.log 語句沒有執行,任務中的 c ...
[英]Specifying a different template path for an ember component
假設我有這樣的結構: (基本上我有兩個組件,它們具有完全相同的模板,但 .ts/.js 文件中的邏輯不同) 是否可以在這兩個 index.ts 文件中指定模板路徑以指向位於上一級的 index.hbs? 或者類似的東西,這個想法是不必在這兩個組件之間復制模板。 我試過上面的結構,但它似乎不起作用。 ...
[英]Is `store.find` function different to `store.findRecord` function on Ember JS?
Ember JS 服務“store”上有兩個類似的功能。 在此示例中,它們的工作方式相似。 find function @service store; async model(params) { return this.store.find('rental', params.r ...
[英]Actual Use Of "" in HandleBars
我被這個問題困擾了很長一段時間: 在 hbs 文件中使用 dynamic-dropdown 時,我無法弄清楚為什么我的 api 調用沒有放在“”下時沒有發生。 例子: API 呼叫發生在: 但出於某種原因,API 調用不會為此發生: 唯一的區別是“狀態”一詞中的“” 我面臨的另一個問題是,在 el ...
[英]How to access child component from parent component in Ember
這個概念相當簡單。 假設我有一個子組件,它有自己獨立的 js 和 hbs。 子組件.hbs => 子組件.js 現在我將它導入到另一個組件Main-component.hbs ,就像這樣 這是使用選項和所有選項按預期呈現的,但是基於selectedOption我想在我的主要組件中做一些事情。 ...
[英]Does an ember package imported component use its parents library version?
我嘗試在 ember 中的 class 中使用導入的 package 中的組件。 我希望該組件使用它自己的 ember-intl 版本。 它導致使用父版本的 ember-intl 導入 package。 我在父級中使用了 ember-intl 5.7.0,在導入的 package 中使用了 4.3 ...
[英]Call asserion for method in emberjs parent class
我有一個從抽象 js 文件 (Parent.js) 擴展而來的 emberjs 文件 (child.js) 在父組件內部,我們將 boolean 屬性默認設置為 false,並且還有 togglePropertyInParent 方法。 我想構建一個單元測試,使用 sinon 斷言 togglePr ...
[英]EmbeJS: How to force action inside {{input..}} react earlier then action in its parent?
我有一個 問題是divAction在checkboxAction之前觸發。 如何先強制checkboxAction ? 我也試過: 在代碼中 結果是一樣的。 這是一個小游戲。 勾選復選框時,請參閱控制台中的 output。 他們不工作。 如果您刪除對 then 的操作,則一切正常。 我需要讓它與動 ...
[英]Ember invoke a component function from another component in same engine parent
我的要求是使用來自另一個組件的組件操作。需要知道在這種情況下是否可以使用 data-down。 說, 我正在嘗試從這里engine/addon/templates/application.hbs調用第一個組件,如下所示引擎/插件/模板/application.hbs 我想從這個FirstCompo ...
[英]What is the difference between route and path in EmberJs
EmberJs中路由和路徑有什么區別 ...
[英]How to check if array is empty in handlebar templates?(ember js)
我有模板,其中包含簡單的圖標模板: 可以看出,我需要一個標志來顯示/顯示它,並且我正在為它使用hidden的 class。 我有數據陣列“疾病”。 所以如果它是空的我不應該顯示圖標,如果它不空我應該顯示這個圖標。 我試過條件: 這給出了錯誤。 我發現可以編寫 ember handle bar fu ...
[英]Micro frontend using module federation with EmberJS
賞金將在 3 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Gautam正在尋找可靠來源的答案。 我們想知道 WebPack 模塊聯合構建系統在 Ember JS 應用程序中的可行性,用於從 Ember 應用程序調用聯合代碼以連接在 React JS 或其他 SPA 中開發的其他前端代碼庫 ...
[英]How to programmatically insert an Ember component into a div?
我想找出一種方法來使用 Ember 組件作為工具提示的視圖模板。 讓我解釋一下: 我應該創建一個庫來在 Ember 中顯示工具提示。 此工具提示的內容未知。 它可能非常復雜,也可能是簡單的文本。 開發人員是決定它的人,但圖書館必須提供一種輕松完成它的方法。 此外,我想以Ember 修改器的格式提供 ...
[英]How can i dynamically add an Input select element on click of a button in ember
我正在創建一個 ember 應用程序,我需要動態添加一個 select 元素,該元素將從服務器獲取選項。 所以 select 元素看起來像這樣。 而不是預定義所有下拉框,我需要像單擊按鈕一樣動態添加它們(+ 添加更多)。 喜歡 並且每個下拉框都應包含從服務器獲取的數據。 另外我需要一種方法來從那些 ...
[英]How do I replace @each computed props when moving to Ember Octane
我的組件中有很多computed道具,如下所示: 而且我仍然收到 linter 的投訴: 我能夠用@tracked替換非@each道具,但是@each和@tracked對我不起作用。 ...