Skip to content

Commit

Permalink
directive scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinch committed May 23, 2015
1 parent a8e585c commit 518f26e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS.komodoproject
*.komodoproject
nbproject/
38 changes: 38 additions & 0 deletions directives_explained.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<script src="./scripts/angular/angular.min.js"></script>
<link rel="stylesheet" href="./styles/global.css">

<script>
var app = angular.module("myApp", []);
app.run(function($rootScope, $timeout) {

});
app.controller('MyController', ['$scope', '$filter', function($scope, $filter){

}]);



</script>

</head>
<body ng-controller="MyController">

<div ng-app="myApp" ng-init="someProperty='some data'"></div>
<div ng-init="siblingProperty='more data'">
Inside div Tow
<div ng-init="aThirdProperty"></div>
</div>

<div>
<h1> enable button after property is not false</h1>
<input type="text" ng-model="someProperty" placeholder="Type to Enable">
<button ng-model="button" ng-disabled="!someProperty">A Button</button>
</div>

</body>
</html>

0 comments on commit 518f26e

Please sign in to comment.