-
Notifications
You must be signed in to change notification settings - Fork 8
Single Injection Example
Ramy Ben Aroya edited this page May 7, 2015
·
4 revisions
#####Single Content Injection example The following code:
// Brocfile.js
var EmberAddon = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
'ember-index': {
output: 'index.jsp'
content: {
file: 'example.txt',
includeInOutput: true
includeInIndexHtml: false
}
}
});
module.exports = app.toTree();
// app/example.txt
<!-- some content from exapmle.txt -->
<!-- app/index.html -->
{{content-for 'ember-index'}}
<!DOCTYPE html>
<html>
<head>
....
</head>
<body>
...
</body>
</html>
Will result
<!-- dist/index.html -->
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
...
</body>
</html>
<!-- dist/index.jsp -->
<!-- some content from exapmle.txt -->
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
...
</body>
</html>