<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-directive-template-url-production</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="myController">
<input type="text" ng-model="search.name" />
<sample-control ng-repeat="property in properties | filter:search.name"></sample-control>
</div>
</body>
</html>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
(function(angular) {
'use strict';
angular.module('myApp', [])
.controller('myController', ['$scope', function($scope) {
$scope.search = {
name: ""
};
$scope.properties = [{
name: "titletext",
title: "Text",
type: "textbox"
},{
name: "tooltiptext",
title: "Tooltip Text",
type: "textbox"
},{
name: "chartmarginbottom",
title: "Margin Bottom",
type: "textbox"
}];
}])
.directive('sampleControl', function() {
return {
templateUrl: "my-customer.html",
restrict: "E"
};
});
})(window.angular);
/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
<div>
<label ng-bind="property.name"></label>
</div>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->