These rules are adopted from the AngularJS commit conventions.
app.import()
works with node_modules
now! As of Ember 2.15. Previously it only worked with bower_components
and vendor
.
Docs for app.import
are here:
https://ember-cli.com/managing-dependencies#standard-non-amd-asset
This method (vendor-shim) wraps the global export into an es6 module (but the global one is still present). It doesn't use an es6 interface even if the library offers one, but that's okay for my use case.
Things could still be easier, see this thread for the current state of that.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
// This is not working. | |
value: Ember.computed('object', 'propertyName', function() { | |
let prop = Ember.get(this, 'propertyName'); | |
return Ember.get(this, `object.${prop}`); | |
}).volatile() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
loadingIndicator: Ember.inject.service('loading-indicator'), | |
classNames: ['loading-indicator'], | |
classNameBindings: ['isLoading'], | |
isLoading: false, | |
init() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/omniauth/facebook.rb | |
require 'httparty' | |
module Omniauth | |
class Facebook | |
include HTTParty | |
# The base uri for facebook graph API | |
base_uri 'https://graph.facebook.com/v2.3' |