Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div ng-app="components">
- <input ng-model="var">
- <block>
- 123
- <input ng-model="var">
- </block>
- </div>
- angular.module('components', []).directive('block',function(){
- return{
- scope:false,
- replace:true,
- restrict:"E",
- transclude:true,
- template:'<div class="block" ng-transclude></div>',
- link:function(scope, el, attrs, ctrl){
- }
- }
- });
- .ng-scope{
- border:1px solid red;
- margin:10px;
- }
Add Comment
Please, Sign In to add comment