🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ember-cli-at-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-at-js

A thin wrapper around At.js

0.0.3
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

ember-cli-at-who

A thin wrapper around At.js.

Installation

ember install ember-cli-at-js

Explanation

This addon wraps At.js and gives you an Ember.TextArea with an extra property called settings. This property is handled over to At.js constructor.

Sample Code

// /app/controller/application.js
import Ember from 'ember';

export default Ember.Controller.extend({

  settings: {
    data: ['juan', 'pedro']
  },

  value: null

});
// /app/templates/application.hbs
{{at-who-textarea settings=settings value=value}}

Other options

Maybe you are creating your own component and want to drop off support for At.js, in that case you may want to use the AtWhoSupport class that has everything the TextArea does but without subclassing it.

// /app/components/my-component.js
import Ember from 'ember';
import AtWhoSupport from 'ember-cli-at-js/mixins/at-who-support';

export default Ember.Component.extend(AtWhoSupport, {
});

Styling

By default this component ships with no styles but you can easily add them in your ember-cli.build.js file.

/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    // Add options here
  });

  // Linking to At.js default styles
  app.import(app.bowerDirectory + '/At.js/dist/css/jquery.atwho.css');

  /*
    This build file specifes the options for the dummy test app of this
    addon, located in `/tests/dummy`
    This build file does *not* influence how the addon or the app using it
    behave. You most likely want to be modifying `./index.js` or app's build file
  */

  return app.toTree();
};

Keywords

ember-addon

FAQs

Package last updated on 29 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts