Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created January 21, 2016 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/8651a2ca705f8241182a to your computer and use it in GitHub Desktop.
Save codeaholicguy/8651a2ca705f8241182a to your computer and use it in GitHub Desktop.
// An Angular directive with dependencies
app.directive('myComponent', ['Notifier', '$filter', function(Notifier, $filter) {
const formatName = $filter('formatName');
// use Notifier / formatName
}]
// ES6 Modules used by a React component
import Notifier from "services/notifier";
import { formatName } from "filters";
class MyComponent extends React.Component {
// use Notifier / formatName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment