I am building an app for a scheduler using Appgyver Steroids, and on the navbar, I have a button to switch days, but I can't figure out how to switch de label:
index.html
<script src="/scripts/application.js"></script>
<super-navbar-button ng-bind="dayTitle" side="right" onclick="supersonic.ui.drawers.open('right')">Day</super-navbar-button>
drawerMenu.html
<script src="/scripts/application.js"></script>
<li class="item" onclick="supersonic.ui.drawers.close('right')" ng-model="day" ng-click="newDay()">Monday</li>
<div style="clear: both;"></div>
<li class="item" onclick="supersonic.ui.drawers.close('right')" ng-model="day" ng-click="newDay()">Tuesday</li>
<div style="clear: both;"></div>
application.js
angular.module('SteroidsApplication', [
'supersonic'
])
.controller('IndexController', function($scope, supersonic) {
$scope.newDay= function(){
supersonic.logger.log("Got here");
$scope.dayTitle= $scope.day;
}
});
Right now I'm not even logging the "Got here" text, probably I have a minor error or something I'm missing. This is my first steroids/supersonic/angular/hybrid application. Thanks in advance.
two things dont do onclick with angular, instead do ng-click
did you tried doing
instead of writing the day?