0

I have a Problem with my Ember.js setup. I would love to use uikit and installed it via bower install --save uikit and or over the Ember.js project dependencies. The Problem now is, that the JavaScript part won't work.

I also have googled and found this answer here on Stackexchange: EmberJS and UIKIT but I have imported the uikit like ist is described already.

Thanks so far for helping me bMalum

Community
  • 1
  • 1
bMalum
  • 388
  • 2
  • 13
  • Are you having issues with the css or the js part ? or both ? and could you tell us what kind of issue you're seeing ? – Nazim Aug 12 '16 at 11:11
  • @Nazim CSS looks fine (but no round edges and so on) because the JS part is not working. – bMalum Aug 13 '16 at 09:24

2 Answers2

1

Inside ember-cli-build.js

after this:

var app = new EmberApp(defauts, {
});

you need to call import

app.import('bower_components/uikit/css/uikit.css');
app.import('bower_components/uikit/js/uikit.js');

once imported you should be able to use:

UIkit.button($(".button"), {/* options */});

or anything else in UIkit. UIkit basically becomes a global object in the project.

Rimian
  • 36,864
  • 16
  • 117
  • 117
imahungry
  • 126
  • 8
  • 1
    Thank you! This helped. One very minor correction Your first line should be: `app.import('bower_components/uikit/css/uikit.css');` – dpigera Dec 07 '17 at 21:55
1

This probably wasn't an option for you at the time... now there is an addon/wrapper for it.

https://github.com/adfinis-sygroup/ember-uikit

Rimian
  • 36,864
  • 16
  • 117
  • 117