Quindi - Voglio giocare con typeahead in un'app ember.ember-cli aggiungendo dipendenze con il pergolato
ottengo un cli applicazione installato e funzionante quindi corro
bower install typeahead.js
posso vedere che il codice è stato messo in bower_components.
ho quindi aggiungere il seguente alla brocfile:
/* 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();
Tuttavia non funziona - ho
Uncaught ReferenceError: Bloodhound is not defined
Dalla lettura dei documenti - installazione con gazebo e aggiungendo le linee nel il brocfile dovrebbe essere sufficiente per soddisfarlo? Sto leggendo male o è un bug?
ho creato un repo GIT pubblico che dimostra questo problema:
https://github.com/wayne-o/ember-cli-bootstrap
Tutto quello che ho fatto è:
ember new bootstrap-test
bower install bootstrap
E poi ha aggiunto:
app.import('bower_components/bootstrap/dist/css/bootstrap.css');
app.import('bower_components/bootstrap/dist/js/bootstrap.js');
a il brockfile ...
Non ha funzionato ...
typeahead.bundle.min.js dovrebbe contenere bloodhound. Prova a rimuovere il bloodhound.js import –
Ancora ricevendo l'errore:/ – iwayneo
@drorb Ho modificato la domanda e aggiunto un repository su github che mostra il problema ... – iwayneo