Last active
March 31, 2017 22:46
-
-
Save hbrysiewicz/d4e4aad8932df3c2bee9ea49ca173875 to your computer and use it in GitHub Desktop.
Inline SVG - Part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember' | |
const { | |
Component, | |
computed: { alias } | |
} = Ember | |
export default Ember.Component.extend({ | |
attributeBindings: [ | |
'data', | |
'type' | |
], | |
tagName: 'object', | |
type: 'image/svg+xml', | |
data: alias('model.url') | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember' | |
const { | |
Controller, | |
computed | |
} = Ember | |
export default Controller.extend({ | |
appName: 'Ember Inline SVG - Step 1', | |
models: computed(function() { | |
let models = [] | |
for (let i = 0; i < 70; i++) { | |
models.push({ | |
url: 'https://hbrysiewicz.com/assets/img/ember.svg' | |
}) | |
} | |
return models | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment