Skip to content

Instantly share code, notes, and snippets.

@chicojunior
Created July 28, 2016 20:38
Show Gist options
  • Save chicojunior/4c612f4a30d4def0a23651a25f57149d to your computer and use it in GitHub Desktop.
Save chicojunior/4c612f4a30d4def0a23651a25f57149d to your computer and use it in GitHub Desktop.
function setAreaPictures(data) {
for (var i = 0; i < data.length; i++) {
if (data[i].business_area == "Beleza") {
$scope.areas[i].areaPicture = "img/area_icons/woman.svg";
} else if (data[i].business_area == "Comércio") {
$scope.areas[i].areaPicture = "img/area_icons/commerce.svg"
} else if (data[i].business_area == "Educação física") {
$scope.areas[i].areaPicture = "img/area_icons/football.svg"
} else if (data[i].business_area == "Música") {
$scope.areas[i].areaPicture = "img/area_icons/speaker.svg"
} else if (data[i].business_area == "Nutrição") {
$scope.areas[i].areaPicture = "img/area_icons/ham.svg"
} else if (data[i].business_area == "Odontologia") {
$scope.areas[i].areaPicture = "img/area_icons/tooth-with-braces.svg"
} else if (data[i].business_area == "Serviços") {
$scope.areas[i].areaPicture = "img/area_icons/briefcase.svg"
} else if (data[i].business_area == "Tecnologia") {
$scope.areas[i].areaPicture = "img/area_icons/monitor.svg"
} else if (data[i].business_area == "Treinamento") {
$scope.areas[i].areaPicture = "img/area_icons/seo-trainning.svg"
} else {
$scope.areas[i].areaPicture = "https://openclipart.org/image/2400px/svg_to_png/194077/Placeholder.png";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment