I have a main controller in my app.js for the ionic-tinder-cards. Now I am trying to close that controller with " }); " and put another controller in the file. It seems that anytime I try to close the controller or add another, this happens:
Here is the controller:
.controller(‘CardsCtrl’, function($scope) {
var cardTypes = [
{ image: ‘img/pic2.png’, title: ‘Forever 21’, titleRight: ‘$45.99’},
{ image: ‘img/pic3.png’, title: ‘yoox.com’, titleRight: ‘$17.99’},
{ image: ‘img/pic4.png’, title: ‘SSENSE’, titleRight: ‘$29.99’},
];
$scope.cards = [];
$scope.addCard = function(i) {
var newCard = cardTypes[Math.floor(Math.random() * cardTypes.length)];
newCard.id = Math.random();
$scope.cards.push(angular.extend({}, newCard));
}
for(var i = 0; i < 3; i++) $scope.addCard();
If I put the }); then it breaks (like seen above).
This may be an obvious mistake, but I am a newcomer to Angular.
Any suggestions or possible causes> Thanks!