Closed buschtoens closed 9 years ago
Emblem wouldn't know the difference since it doesn't actually boot Ember. Could you try something like:
= title "My Cool App" separator=" | " prepend=true
If I do this, I get this runtime error and nothing is rendered:
Uncaught TypeError: this.__defineNonEnumerable is not a functionClass
@ ember.debug.js:36199helperFunc
@ ember.debug.js:6394_emberMetalMerge.default.compute
@ ember.debug.js:9726Stream.value
@ ember.debug.js:20468invokeHelper
@ ember.debug.js:7918inline
@ ember.debug.js:49903_htmlbarsUtilObjectUtils.merge.inline
@ ember.debug.js:48971RenderResult.populateNodes
@ ember.debug.js:50603RenderResult.render
@ ember.debug.js:50538render
@ ember.debug.js:50357(anonymous function)
@ ember.debug.js:51125renderAndCleanup
@ ember.debug.js:51161block
@ ember.debug.js:51123(anonymous function)
@ ember.debug.js:9528instrument
@ ember.debug.js:10033ViewNodeManager.render
@ ember.debug.js:9513exports.default.render
@ ember.debug.js:8688handleKeyword
@ ember.debug.js:49800keyword
@ ember.debug.js:49925exports.default
@ ember.debug.js:8558handleKeyword
@ ember.debug.js:49761handleRedirect
@ ember.debug.js:49747inline
@ ember.debug.js:49890_htmlbarsUtilObjectUtils.merge.content
@ ember.debug.js:48981RenderResult.populateNodes
@ ember.debug.js:50605RenderResult.render
@ ember.debug.js:50538render
@ ember.debug.js:50357(anonymous function)
@ ember.debug.js:51125renderAndCleanup
@ ember.debug.js:51161block
@ ember.debug.js:51123keywords.yield
@ ember.debug.js:49971handleKeyword
@ ember.debug.js:49761handleRedirect
@ ember.debug.js:49747inline
@ ember.debug.js:49890_htmlbarsUtilObjectUtils.merge.content
@ ember.debug.js:48981RenderResult.populateNodes
@ ember.debug.js:50605RenderResult.render
@ ember.debug.js:50538render
@ ember.debug.js:50357(anonymous function)
@ ember.debug.js:51125renderAndCleanup
@ ember.debug.js:51161block
@ ember.debug.js:51123(anonymous function)
@ ember.debug.js:9528instrument
@ ember.debug.js:10033ViewNodeManager.render
@ ember.debug.js:9513exports.default.render
@ ember.debug.js:8688handleKeyword
@ ember.debug.js:49800keyword
@ ember.debug.js:49925exports.default
@ ember.debug.js:8558handleKeyword
@ ember.debug.js:49761handleRedirect
@ ember.debug.js:49747inline
@ ember.debug.js:49890_htmlbarsUtilObjectUtils.merge.content
@ ember.debug.js:48981RenderResult.populateNodes
@ ember.debug.js:50605RenderResult.render
@ ember.debug.js:50538render
@ ember.debug.js:50357(anonymous function)
@ ember.debug.js:51125renderAndCleanup
@ ember.debug.js:51161block
@ ember.debug.js:51123(anonymous function)
@ ember.debug.js:9528instrument
@ ember.debug.js:10033ViewNodeManager.render
@ ember.debug.js:9513renderHTMLBarsBlock
@ ember.debug.js:10282_emberMetalMixin.Mixin.create.renderBlock
@ ember.debug.js:43195Renderer_prerenderTopLevelView
@ ember.debug.js:11374Renderer_renderTopLevelView
@ ember.debug.js:11383Queue.invoke
@ ember.debug.js:899Queue.flush
@ ember.debug.js:965DeferredActionQueues.flush
@ ember.debug.js:765Backburner.end
@ ember.debug.js:158Backburner.run
@ ember.debug.js:226Backburner.join
@ ember.debug.js:261run.join
@ ember.debug.js:19518run.bind
@ ember.debug.js:19581jQuery.Callbacks.fire
@ jquery.js:3148jQuery.Callbacks.self.fireWith
@ jquery.js:3260jQuery.extend.ready
@ jquery.js:3472completed
@ jquery.js:3503
It's probably that title
isn't a block helper, but an "inline" (?) helper. Don't know what they're called.
I'm not sure :(
I tested out the addon on Ember 1.13.3 / ember-document-title@1.13.0 and it didn't give any errors. I can confirm that the output of that in Emblem is:
{{title "My Cool App" separator=" | " prepend=true}}
Wait a second. Did I understand correctly, that it works just fine for you?
If so, I'll test it again in a fresh app.
Yap, works. It has to be another addon that introduces this bug. I'll dig into this.
For the curious:
{
"name": "veltro",
"version": "0.0.0",
"description": "Small description for veltro goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"ember-cli": "^1.13.1",
"ember-cli-app-version": "0.4.0",
"ember-cli-auto-register-helpers": "1.0.1",
"ember-cli-autoprefixer": "0.4.1",
"ember-cli-babel": "^5.0.0",
"ember-cli-bourbon": "1.0.1",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.0",
"ember-cli-deploy": "0.4.2",
"ember-cli-dotenv": "1.0.0",
"ember-cli-emblem": "0.2.7",
"ember-cli-gzip": "1.1.1",
"ember-cli-htmlbars": "0.7.9",
"ember-cli-htmlbars-inline-precompile": "^0.1.1",
"ember-cli-i18n": "0.0.6",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-mirage": "0.1.5",
"ember-cli-neat": "0.0.4",
"ember-cli-qunit": "0.3.15",
"ember-cli-release": "0.2.3",
"ember-cli-sass": "4.0.1",
"ember-cli-server-variables": "0.0.3",
"ember-cli-simple-auth": "0.8.0",
"ember-cli-simple-auth-token": "0.7.2",
"ember-cli-styles-reloader": "0.1.6",
"ember-cli-uglify": "^1.0.1",
"ember-component-css": "git://github.com/jeffhertzler/ember-component-css.git#880df649fdc50a98fe09de63c620d04177a246bb",
"ember-data": "1.13.5",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-document-title": "1.13.0",
"ember-export-application-global": "^1.0.2",
"ember-feature-flags": "1.1.0",
"ember-moment": "1.2.1",
"ember-suave": "0.1.11",
"liquid-fire": "0.20.4"
}
}
ember-cli-auto-register-helpers
is the fugitive.
Happens with .hbs
code as well. Not an issue with this addon. Closing.
I'm using
ember-document-title
, which registers thetitle
helper in order to set the document title in the templates.However, I can't use the
title
helper, as Emblem renders it as the<title>
tag:It would be nice, if we could teach Emblem to prefer helpers over HTML tags.