Open aldo86 opened 8 years ago
Finally got it.
After some debugging, I noticed that watchlist Object had a name Conflict with its constructor. So changing the name of the variable to "wlist" solved the problem
Good spot!
Following on from aldo86's fix, this also means that when you get to the end of Step 7 : Updating the Watchlist View you must add the directive using:
<stk-stock-table ng-show="stocks.length" watchlist="wlist">
Agreed good answer, but the "problem" here is more likely to be with the updated yeoman/angular generators. The code that they generate in app.js looks like this:
.when('/watchlist/:listId', {
templateUrl: 'views/watchlist.html',
controller: 'WatchlistCtrl'
controllerAs: 'watchlist'
})
It is this 'watchlist' here that causes the conflict. The StockDog demo code does not define controllerAs keys:
.when('/watchlist/:listId', {
templateUrl: 'views/watchlist.html',
controller: 'WatchlistCtrl'
})
Therefore no conflict in the demo code! Rather than rename the other 'watchlist' everywhere why not just remove or rename the one offending "controllerAs" key/value?
Im getting this error on watchlist.js line 29 when trying to Add a new Stock share to a watchlist