Ember-2.0 corner staple component not working with ember-cli@0.2.7

Please, what else do I need in order for the ember-2.0 corner bracket component to work with the latest ember-cli

I am using ember-cli 0.27 , nodejs 0.12.4 and emberjs canary branch to test emberjs-2.0.

I created a new ember app with bones:

  ember new test-app

      

and created the component with

    ember g component my-test

      

In application.hbs, if I add below line to call the component, the content of the component is not displayed.

    <my-test  />

      

If you change the line above to the one below, the content of the component is displayed.

{{my-test}}

      

Here is an excerpt from my bower.json

    {
      "name": "em",
      "dependencies": {
         "ember": "components/ember#canary",
         "ember-data": "components/ember-data#canary",,
         "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
         "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
         "ember-data": "1.0.0-beta.18",
         "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
         "ember-qunit": "0.3.3",
          "ember-qunit-notifications": "0.0.7",
          "ember-resolver": "~0.1.15",
          "jquery": "^1.11.1",
         "loader.js": "ember-cli/loader.js#3.2.0",
         "qunit": "~1.17.1"
   },
   "resolutions": {
       "ember": "canary",
       "ember-data": "canary"
     }
   }

      

Here is my package, json

  "devDependencies": {
     "broccoli-asset-rev": "^2.0.2",
     "ember-cli": "0.2.7",
     "ember-cli-app-version": "0.3.3",
     "ember-cli-babel": "^5.0.0",
     "ember-cli-content-security-policy": "0.4.0",
     "ember-cli-dependency-checker": "^1.0.0",
     "ember-cli-htmlbars": "0.7.6",
     "ember-cli-ic-ajax": "0.1.1",
     "ember-cli-inject-live-reload": "^1.3.0",
     "ember-cli-qunit": "0.3.13",
     "ember-cli-uglify": "^1.0.1",
     "ember-data": "1.0.0-beta.18",
     "ember-disable-proxy-controllers": "^1.0.0",
     "ember-export-application-global": "^1.0.2"
  }

      

+3


source to share


1 answer


At this point, this function is still behind the function flag. Therefore, it is necessary to enable the corresponding flag.

Feature flags are included in config / environment.js, and in your case it should look something like this:

 ...
 EmberENV: {
  FEATURES: {
    'ember-htmlbars-attribute-syntax': true,
    'ember-htmlbars-inline-if-helper': true,
    'ember-htmlbars-component-generation': true
  }
 }

      



example config / environment.js -> https://github.com/stefanpenner/ember-jobs/blob/master/config/environment.js#L17

Also for reference: * feature guide: http://guides.emberjs.com/v1.10.0/configuring-ember/feature-flags/

+7


source







All Articles