Please help me, I have this function in my main controller:
$scope.link = function (demo) {
var index = $scope.demos.findIndex((v) => v.id === demo.id)
alert(index)
}
instead of making an alert with the index, I would like it to take me to a link, example:
if (index % 2 == 0) {
take me to a link...'www.example.com'
}
how can i do this?