gajus / gajus/angular-swing

How to dynamically add card to stack?

Open
#5 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
180
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I'm creating an initial stack of cards and want to add a new card at the bottom of the stack to replace a card that has been thrown out. Is there a way of achieving this?

Here is the function I'm using. Currently cards are being added at the top of the stack. Using `$scope.stack.push` instead of `unshift` also produces the same result.

``` JavaScript
$scope.addCard = function(name) {
$scope.stack.unshift({
'name': name
});
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.