ember-addons / bootstrap-for-ember

Bootstrap for Ember.js
http://ember-addons.github.io/bootstrap-for-ember
Apache License 2.0
703 stars 103 forks source link

Using Panel in Ember-CLI gives error #150

Closed rizkytahara closed 10 years ago

rizkytahara commented 10 years ago

Hi,

I'm trying to integrate Ember-CLI with Bootstrap For Ember. When I'm trying to use the panel, the console gives me error:

Uncaught Error: <backend@view:toplevel::ember287> Handlebars error: Could not find property 'bs-panel' on object (generated application controller). 

Here is my Brocfile.js:

/* global require, module */

var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');

var app = new EmberApp();

// javascripts
// bootstrap for ember
bsPath = 'vendor/ember-addons.bs_for_ember/dist/js/';
[
  'bs-core',
  'bs-alert',
].forEach(function (file) {
  app.import(bsPath + file + '.min.js');
});

// fonts
// bootstrap fonts
var bootstrapFonts = pickFiles('vendor/bootstrap-sass-official/assets/fonts/bootstrap', {
  srcDir: '/',
  destDir: '/assets/bootstrap',
});

// Merge all with the ember app tree
module.exports = mergeTrees([
  bootstrapFonts,
  app.toTree()
]);

And here is my application.hbs:

<h2 id='title'>Welcome to Ember.js</h2>

{{bs-alert message="A self destroyable hello world message!" type="info" fade=true}}

{{#bs-panel heading="Simple Panel" footer="Panel Footer"}}
    <p>Panel content goes here...!</p>
{{/bs-panel}}

{{outlet}}

If I remove the {{#bs-panel}}, the {{bs-alert}} is working fine; any solution for this?

asaf commented 10 years ago

you need to include 'basic' file, then it'll work.