Created
May 24, 2016 10:39
-
-
Save chanakaDe/c2183a7ff5ad45d438b75ba6e9fa1450 to your computer and use it in GitHub Desktop.
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
app.directive('img', -> | |
# restrict: 'A' | |
link: (scope, iterStartElement, attr, element) -> | |
`function getImages(name) { | |
var images = document.getElementsByTagName('img'); | |
console.log("Demo name", name); | |
console.log("IMAGE LENGTH : ", images.length); | |
console.log(images); | |
var i; | |
for (i = 0; i < images.length; i++) { | |
console.log("IMAGE : ", images[i].src); | |
images[i].src = 'http://steam.realss.com/realss/website' + images[i].src; | |
} | |
console.log("IMAGE LENGTH LAST : ", images.length); | |
}` | |
getImages "img" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment