JSFiddle - React, Tailwind, and code Playground
by ruhul105
HTML
<div ng-controller="baseCtrl as base">
<button ng-click="base.myFunction(base.myVar)">Button</button>
</div>
JavaScript
angular
.module('app')
.controller('baseCtrl', baseCtrl);
function baseCtrl($scope) {
var base = this;
$scope.myVar = "string2";
$scope.myFunction = myFunction;
function myFunction(value) {
value = 'string_2"';
console.log(value);
}
}