ember-cli

Add node module to ember CLI app

巧了我就是萌 提交于 2020-01-20 03:58:04
问题 I would like to use this Node.js module https://www.npmjs.com/package/remarkable-regexp in my Ember-CLI application. How do I make it available to the Ember application? I tried it by adding this to the Brocfile.js app.import('node_modules/remarkable-regexp/index.js'); but it fails like this: Path or pattern "node_modules/remarkable-regexp/index.js" did not match any files 回答1: Since remarkable-regexp is a npm module, I believe the best way to integrate it with ember-cli is by using ember

How to add date picker or any general jQuery plugin to Ember-CLI App

℡╲_俬逩灬. 提交于 2020-01-19 12:54:25
问题 So I am trying to add pikaday date picker to Ember-CLI app. I've got the following in my /app/views/calendar-view.js import Ember from 'ember'; export default Ember.TextView.extend({ modelChangedValue: function(){ console.log(this.get('value')); }.observes("value"), didInsertElement: function(){ currentYear = (new Date()).getFullYear(); formElement = this.$()[0]; picker = new Pikaday({ field: formElement, yearRange: [1900,currentYear+2] }); this.set("_picker", picker); }, willDestroyElement:

ember-cli torii and multiple providers

给你一囗甜甜゛ 提交于 2020-01-17 04:42:32
问题 I am trying to set up an authenticator which would be valid for many providers, because in the backend I am using doorkeeper assertion method which handles the whole flow. I have installed: * "ember-cli-simple-auth": "0.8.0-beta.1" * "ember-cli-simple-auth-oauth2": "^0.8.0-beta.2" * "ember-cli-simple-auth-torii": "^0.8.0-beta.2" * "torii": "^0.3.4" I was looking at this issue Workflow for Ember-simple-auth, Torii and Facebook Oauth2 so I could write this: # templates/login <a {{action

ember-cli torii and multiple providers

大憨熊 提交于 2020-01-17 04:42:06
问题 I am trying to set up an authenticator which would be valid for many providers, because in the backend I am using doorkeeper assertion method which handles the whole flow. I have installed: * "ember-cli-simple-auth": "0.8.0-beta.1" * "ember-cli-simple-auth-oauth2": "^0.8.0-beta.2" * "ember-cli-simple-auth-torii": "^0.8.0-beta.2" * "torii": "^0.3.4" I was looking at this issue Workflow for Ember-simple-auth, Torii and Facebook Oauth2 so I could write this: # templates/login <a {{action

Observe Ember Data store changes in component

孤街浪徒 提交于 2020-01-16 07:45:34
问题 I have a component which creates record for a specific model like this: export default Ember.Component.extend({ store: Ember.inject.service(), addRecord(account) { this.get('store').createRecord('update', { authUid: account.get('authUid'), service: account.get('platform') }); } }); I have another component that needs to observe changes done to a particular model (i.e. if records are added or deleted), and show them in that component. export default Ember.Component.extend({ store: Ember.inject

Why is Firebase data not displaying properly in my Ember CLI generated output?

耗尽温柔 提交于 2020-01-15 04:49:51
问题 I've successfully setup Ember CLI and Firebase and I'm attempting to bring some basic data into my templates. My 'title' and 'subtitle' data are apparent in the Ember Inspector, as well as my Firebase project dashboard. However, {{foo.title}} and {{foo.subtitle}} are coming back empty and undefined in the browser. Why is that? Here's my code: application.js (adapter) import DS from 'ember-data'; export default DS.FirebaseAdapter.extend({ firebase: new window.Firebase('https://<firebase

How to use a custom authorizer and custom authenticator for ember simple-auth in ember cli

南笙酒味 提交于 2020-01-12 05:39:51
问题 I don't understand how I'm supposed to include my custom authenticator and custom authorizor with ember cli. Where to put it and what to include and how to do it. The cli example for simple-auth provided unfortunately does not cover custom authorizer and authenticator. The build is successfully, but when running it in the browser, I get the error TypeError: SimpleAuth.Authenticators is undefined I'm aware that I'm doing something wrong, but could you please guide me or point me to the right

Ember CLI sends analytics information by default to who?

纵然是瞬间 提交于 2020-01-11 05:55:50
问题 This is the .ember-cli file. { /** Ember CLI sends analytics information by default. The data is completely anonymous, but there are times when you might want to disable this behavior. Setting `disableAnalytics` to true will prevent any data from being sent. */ "disableAnalytics": false } Who does Ember CLI send analytics to by default? 回答1: Isn't it amazing that we can track anything in our tools when it has open sources? Let's track together. The question: what is it in general? The answer:

Exclude folders from builds in Brocfile

試著忘記壹切 提交于 2020-01-11 00:11:35
问题 Is there a way to exclude a folder from a build in a Brocfile (or any other place). The use case is packaging, where I have an app made of sub-apps within pods. eg. /app/modules/components /app/modules/app1 /app/modules/app2 /app/modules/app3 I'd like to build them all when environment is set to 'development' or only eg. 'app1' when environment is 'app1'. Any suggestions? I have tried different combinations of broccoli-file-remover, broccoli-funnel and broccoli-merge-trees to no avail. var

Ember.js: HtmlBars and the Handlebars.compile command

*爱你&永不变心* 提交于 2020-01-10 01:40:06
问题 I get the following error when running my app: Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`. It is related to this piece of code: var CarouselView = Ember.View.extend({ template: Ember.Handlebars.compile('{{view view.itemsView}}'), elementId: 'carousel', contentBinding: 'content', ... There is already an issue related about this problem on ember.js github: https://github.com/emberjs/ember.js