JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="MyApp">
<div ng-controller="MyController" class="first">
<a href="123" ng-click="toggle()">Click me to toggle</a>
<hr>
<div ng-show="show">Hello,World!</div>
</div>
<div class="second" ng-controller="MySec">
<form>
<input type="text" ng-model="user.username">
<div ng-click="show(user.username)">Click me show username</div>
</form>
<div ng-bind="showName"></div>
</div>
</div>
CSS
.first {
border: 1px solid black;
}
.second {
border: 1px solid blue;
}
JavaScript
angular.module("MyApp", [])
.controller("MyController", ["$scope", function ($scope) {
$scope.show = true;
$scope.toggle = function () {
$scope.show = !$scope.show;
return false;
}
}])
.controller("MySec", ["$scope", function($scope){
$scope.user = {
username: null
};
$scope.showName = "something";
$scope.show = function(name){
$scope.showName = name;
}
}])