JSFiddle - React, Tailwind, and code Playground
by karin
HTML
<div data-ng-app="daTable" data-ng-controller="pnlController">
<span id="da-btn-HL" data-ng-show="showingConsensus" data-ng-click="showHL=!showHL;columnView()" title="show high-low" class="da-btn-sml">high-low</span>
<span class="move" data-ng-click="moveLeft()" title="left">move</span>
</div>
CSS
.da-btn-sml{
background:peru;
}
.move{
background:pink;
cursor:pointer;
}
JavaScript
var app = angular.module("daTable", ["customService"]);
angular.module("customService", [])
.factory("scrollService", function () {
return {
MoveLeft: function (showConsensus) {
showConsensus = false;
console.log(showConsensus);
// return showConsensus;
}
}
});
app.controller('pnlController', ['$scope', 'scrollService', function($scope, scrollService) {
$scope.showingConsensus = true;
$scope.moveLeft = function () {
scrollService.MoveLeft($scope.showingConsensus);
console.log($scope.showingConsensus);
}
}]);