2

I have created and ember in-repo-addon. Let's say say-hello. After that I created ember-eninge. Let's say users-engine.

In may main application I can directly use the addon as

//application.hbs
{{say-hello}}

How to use it in the users-engine ?

//lib/users-engines/templates/index.hbs
{{say-hello}} //It is not working also not throwing any error 
jacefarm
  • 6,747
  • 6
  • 36
  • 46
murli2308
  • 2,976
  • 4
  • 26
  • 47

1 Answers1

1

I found the answer but not sure whether it is correct way or not.

In the users-engine/package.json add relative path to addons

{
  "name": "users-engine",
  "keywords": [
    "ember-addon",
    "ember-engine"
  ],
  "dependencies": {
    "ember-cli-htmlbars": "*"
  },
  "ember-addon": {
    "paths": [
      "../say-hello"
    ]
  }
}

and now you can use in-repo-addon in ember-engine directly.

//lib/users-engines/templates/index.hbs
{{say-hello}} //It is working now.
murli2308
  • 2,976
  • 4
  • 26
  • 47
  • I'm with the exact same problem, but for me your solution did not work. :( – William Weckl May 25 '17 at 02:11
  • Adding path must work. but just check the path of your addon. or post your code here – murli2308 May 25 '17 at 07:21
  • I did exactly what you did, but in my case did not work. I had to do an instance initializer like Cryrivers are suggesting in his post: https://github.com/ember-engines/ember-engines/issues/236 – William Weckl May 27 '17 at 15:16