ember-cli

Ember CLI / browser refresh / production / 404

守給你的承諾、 提交于 2019-12-30 04:36:07
问题 I developed my webapp using Ember CLI 0.1.15, with emberjs. 1.8.1 I built the app with this command: ember build --environment production , and then I made a WAR out of the files produced under the dist folder of my project, and then I drop the WAR on my tomcat's webapps folder. So, when I open the app: http://mytomcat/myapp/ ... it went fine, I saw my login screen, I logged in, and navigate around in my app, everythings fine. I could also do the back/forward button, and ember handles the

Using jquery in Ember-cli

懵懂的女人 提交于 2019-12-29 07:59:50
问题 I am relatively new to both Ember.js and Ember-cli and would really appreciate some help please with using a jquery tooltip in a custom view. All code is below, but when my template is injected, I get the following console error: [Error] TypeError: 'undefined' is not a function (evaluating 'Ember.$().tooltip()') I am using a custom view in a file called tooltip.js: import Ember from 'ember'; export default Ember.View.extend({ tagName: 'span', title: 'The tooltip title', html: true, placement:

Using jquery in Ember-cli

早过忘川 提交于 2019-12-29 07:59:09
问题 I am relatively new to both Ember.js and Ember-cli and would really appreciate some help please with using a jquery tooltip in a custom view. All code is below, but when my template is injected, I get the following console error: [Error] TypeError: 'undefined' is not a function (evaluating 'Ember.$().tooltip()') I am using a custom view in a file called tooltip.js: import Ember from 'ember'; export default Ember.View.extend({ tagName: 'span', title: 'The tooltip title', html: true, placement:

Ember.js and UIKIT

眉间皱痕 提交于 2019-12-25 11:53:12
问题 I try to add UIKIT to my Ember.js project how to do it? 1: bower install --save uikit All work fine on bower.json i don't know what to put on ember-cli-build.js e.g : app.import('bower_components/uikit/css/uikit.css'); How to do about js files? Thanks 回答1: you import js files same way as css files, if js files are in bower_components/uikit/js/uikit.js you do app.import('bower_components/uikit/js/uikit.js'); 来源: https://stackoverflow.com/questions/34465374/ember-js-and-uikit

Embli-Cli Not work after Building

喜你入骨 提交于 2019-12-25 06:13:43
问题 Iam working around Ember-Cli.I build a project and customize the "ember-cli-build.js" but finally it doesn't work. this is my work steps: 1) ember new myapp cd myapp ember server it works fine and i can see my project on "http://localhost:4200" 2) then run ember build --environment=production and get Built project successfully. Stored in "dist/". so it appear that my project built. 3) then i run this url on browser that direct to my dist directory project localhost/~/myapp/dist/index.html but

Can I force 'active' class on a {{link-to}} helper?

╄→гoц情女王★ 提交于 2019-12-25 03:26:05
问题 Here is possibly an edge case for how ember adds the 'active' class on a link to helper. I have my current router set up like so: import Ember from 'ember'; var Router = Ember.Router.extend({ location: PortalDevENV.locationType }); Router.map(function() { this.resource('portal', function() { this.route('admin'); this.resource('placements', function() { this.route('import-debtors'); this.resource('add-debtor', function() { this.route('debtor-form'); }); this.route('view-debtors'); }); this

Vendor directory not being generated during ember-cli project build

不想你离开。 提交于 2019-12-25 02:44:43
问题 I'm trying to build/run an ember-cli based project that I got from a colleague. When I try and run it with > ember server I'm getting the following error: > ember server version: 0.0.40 ENOENT, no such file or directory "vendor/" Error: ENOENT, no such file or directory "vendor/" at Object.fs.readdirSync (fs.js:654:18) at walkSync (/Users/ember/projects/ember/modal-example/node_modules/ember-cli/node_modules/walk-sync/index.js:14:20) at /Users/ember/projects/ember/modal-example/node_modules

Ember render template using yield

人盡茶涼 提交于 2019-12-24 21:22:57
问题 I am trying to implement {{#my-custom-component}} {{my-other-component field=(some-section someSection "PARAM_1" "PARAM_2") onChangeField=(action 'enable' "PARAM_3")}} {{/my-custom-component}} So I want to display/render my-other-component inside my-custom-component. So I'll have a {{yield}} inside my-custom-component. Currently with the above, I am getting RangeError: Maximum call stack size exceeded I suspect I am not passing the params properly. 来源: https://stackoverflow.com/questions

Ember CLI - Custom routing for very basic dropdown

让人想犯罪 __ 提交于 2019-12-24 17:54:53
问题 New to ember and ember cli, and not having any JS based framework experience apart from jQuery (which is not a framework) I find my self stuck at the very beginning compared to work done in Angular, I have a static list of groups which are on REST api `http://localhost:8000/api/groups' and it is only 8 items there, I needed to show them as dropdown for a search criteria. Nothing fancy I started with creating a route and model with the name of groups but app stopped working and I had to create

Multiple routers for an Ember app

六月ゝ 毕业季﹏ 提交于 2019-12-24 16:26:05
问题 Is it possible to have multiple router.js for an Ember app? By default one router.js will have import Ember from 'ember'; import config from '../../config/environment'; var Router = Ember.Router.extend({ location: config.locationType }); export default Router.map(function() { this.resource('sampleroute'); }); and other router.js will have import Ember from 'ember'; import config from '../../config/environment'; var Router = Ember.Router.extend({ location: config.locationType }); export