angular ui router - Why don't comment upvotes work? thinkster.io, angularjs tutorial, mean, incrementUpvote() -
i'm following thinkster angular js tutorial here: https://thinkster.io/angulartutorial/mean-stack-tutorial/ and clicking on upvotes icon next comment fails increment upvote count. in ui-router template(included inline in index.html), ng-click calls addupvote()--but addupvote() defined controller specified in state. way template can call addupvote() if template's associated state/controller somehow inherits other state/controller. , in fact, according ui-router docs here: https://github.com/angular-ui/ui-router/wiki/nested-states-%26-nested-views the way states defined in app.js, app.js: app.config([ '$stateprovider', '$urlrouterprovider', function($stateprovider, $urlrouterprovider) { $urlrouterprovider.otherwise('home'); $stateprovider .state('home', { url: '/home', templateurl: '/home.html', controller: 'mainctrl' } ) .state('posts', { url: '/p...