Also - ich möchte mit typahead in einer Glut App spielen.ember-cli Hinzufügen von Abhängigkeiten mit Bower
erhalte ich eine App auf cli und läuft dann laufe ich
bower install typeahead.js
ich sehen kann, dass der Code setzen in bower_components wurde.
ich folgendes zum brocfile dann hinzufügen:
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('bower_components/typeahead.js/dist/typeahead.bundle.min.js');
module.exports = app.toTree();
aber es funktioniert nicht - ich
Uncaught ReferenceError: Bloodhound is not defined
in der Dokumentenlese - Installation mit Bower und das Hinzufügen der Zeilen in der brocfile sollte genug sein, um es zu befriedigen? Lies ich es falsch oder ist das ein Fehler?
Ich habe eine öffentliche GIT-Repo geschaffen, die dieses Problem zeigt:
https://github.com/wayne-o/ember-cli-bootstrap
Alles, was ich getan habe, ist:
ember new bootstrap-test
bower install bootstrap
Und dann hinzugefügt:
app.import('bower_components/bootstrap/dist/css/bootstrap.css');
app.import('bower_components/bootstrap/dist/js/bootstrap.js');
zu das brockfile ...
Es hat sich Ihre Brocfile.js nicht funktioniert ...
typeahead.bundle.min.js sollte Bluthund enthalten. Versuchen Sie den bloodhound.js Import zu entfernen –
Immer noch den Fehler:/ – iwayneo
@drorb Ich habe die Frage geändert und ein Repo auf Github hinzugefügt, die das Problem ... – iwayneo