Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.js"></script>
  <meta charset="utf-8">
  <title>Local scopes</title>
</head>
<body ng-app="LimitedScopesApp">
  <h1>Local Angular Js scopes</h1>
  <div id="parent" ng-controller="ParentController">
    This is parent scope. n = {{ n }} Update n in parent scope using ng-model <input ng-model="n" />
    <button ng-click="n = 100;">Set n to 100</button> using ng-click
    <div id="child" ng-controller="ChildController">
      This is child controller. n = {{ n }} Update n in child scope: 
      <br/> <button local-click="n = 22;">Set n to 22</button> using local-click
    <br/> <button ng-click="n = 32;">Set n to 32</button> using ng-click
      </p>
    </div>
  </div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
bahmutovpro
0viewers