问题标签 [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.
javascript - emberjs embercli foundation 5 scrolltop undefined on mobile responsive
I am working to couple foundation 5 into my ember application and I am running into a new issue with my navigation that uses the topbarjs. Everything works peachy when viewing the application from the desktop, however, when you expand the chrome dev console to force the design into responsive mode, the hamburger menu triggers this message.
Console error message is:
Uncaught TypeError: Cannot read property 'scrolltop' of undefined
This problem can be duplicated in this code repo: chrishough/embercli-emberjs-stackoverflow
My assumption is it has something to do with the the # symbol in the example nav:
I am using the ember cli project to build my ember application.
Current setup at the time of this post:
ember-cli - 如何调试由 ember-cli 生成和提供的 Javascript 代码?
使用版本:0.0.28-master-e49f47e669
我刚开始玩 ember-cli(顺便说一句很棒的项目)。
使用“ember serve”启动服务器后,我查看了 Chrome-Dev-Tools 中的源代码(foo.js)。Chrome 加载 foo.js 需要几秒钟,正如您在屏幕截图中看到的那样,所有 JS 文件都包含在 eval 中。
如何调试 JS 代码?我在这里想念什么?
javascript - Simple console.log controller action method in Ember.js
In my application.js controller
I have the following actions:
Since I am rather new to debugging Emberjs applications, how do I call those actions from the console? Basically I want to confirm they work correctly and want to hook them up to child views.
I am using the ember cli project to build my ember application.
Current setup at the time of this post:
ember.js - 如何解决“throw er; // 管道中未处理的流错误”错误?
在 OS X 10.9.3 系统上安装 Ember CLI 后,我无法使用ember new my-new-app
,如https://github.com/stefanpenner/ember-cli所示
我收到以下错误:
我怎样才能解决这个问题?
ember-cli - Build error when setting environment variable
When running ember build --environment staging
I get a build error. In config/environment.js I have a condition looking for staging so I can change the baseUrl to our staging services. But when I try and build with the environment set I get the following error:
You must pass a file to 'EmberApp::import'. For directories specify them to the constructor under the 'trees' option.
Is this a problem with ember-cli or do I need to declare my environment in my Brocfile somehow?
ember.js - 组件的 Ember-cli/blueprint POD 结构
我正在使用 ember-cli starter-kit,想知道是否可以使用 POD 文件夹结构?
我的目标是拥有一个像这样的“独立”组件文件夹结构:
组件文件夹
ember.js - ember-cli:创建一个可以渲染视图的助手?
我正在尝试使用 ember-cli 重现 Ember-TodoMVC。我被这部分困住了。
我创建了一个这样的视图:
app/views/action-edit.coffee
当我直接在 Emblem 模板中使用它时,例如view "action-view"
,它工作正常:呈现文本字段。
但是 emberjs.com/guides 建议创建一个助手来渲染视图。
我在 ember-cli 网站上发现了这句话:“请记住,您必须通过导出 makeBoundHelper 来注册您的助手”。经过一段时间努力理解 ES6 模块是如何工作的,我最终得到了这段代码,它不会产生任何 JS 错误:
app/helpers/action-edit.coffee
当我在 Emblem 模板中这样使用它时action-edit
,Ember 在浏览器控制台中输出:
[✓] helper:action-edit ......................... loltodo /helpers/action-edit 供应商/ember/ember.js:3521
所以我假设助手得到了很好的连接。
问题是它呈现空白!
我也试过这个:
app/helpers/action-edit.coffee
这会导致此行中出现错误“未定义不是函数” 。
所以问题是:我如何创建一个使用 ember-cli 渲染视图的助手来重现Ember-TodoMVC 教程的这一步?
ember.js - 使用 Ember CLI 和 broccoli-compass 添加供应商 CSS 库
使用broccoli-compass插件时,我无法将 CSS 库添加到我的 Ember CLI 项目。
我已将此行添加到我的 brocfile 中:
但现在我被困住了。我试过了
但这不起作用,因为(我认为)我已经覆盖了app.styles
.
我已经尝试importPath
在我的 Compass 配置中添加一个,以便我可以@import
在我的 SASS 文件中,但这也没有奏效。
twitter-bootstrap - Ember Cli 和 Twiiter 引导程序
我正在关注这里的示例http://reefpoints.dockyard.com/2014/05/07/building-an-ember-app-with-rails-part-1.html我尝试使用安装 twitter bootstrap此处的解决方案推荐在 Ember.JS ember-cli App 中包含引导库的方法,但它对我不起作用。
当我查看页面源代码时,我看到:
这是我的 Broc 文件:
除了我尝试安装 twitter bootstrap 之外,没有其他任何不同的地方可以帮忙吗?
ember-cli - 在配置文件中保存 ember-cli 的端口号
我确定我记得在某处看到一些文档可以将 ember-cli 使用的端口号保存在配置文件中,但它似乎没有在文档中说明任何内容。
我必须使用
但我很想将该端口号保存在文件中。