var editor = angular.module("editor",[]);
var app = angular.module('plunker', ['editor']);
editor.controller('EditorController', function($scope) {
});
editor.directive("editorView",function(){
return {
restrict :"EAC",
templateUrl : "editor.html",
scope : {
content : "=editorView"
},
link : function(scope,element,attrs){
}
};
});
app.controller('BaseController', function($scope) {
$scope.content = 'World';
});
<!doctype html>
<html ng-app="plunker" >
<head>
<meta charset="utf-8">
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.js"></script>
<script src="app.js"></script>
</head>
<body>
<div class="container" ng-controller="BaseController">
<div class="row">
<div class="span12" editor-view="content"></div>
</div>
</div>
</body>
</html>
/* Put your css in here */
<div ng-controller="EditorController">
{{content}}
</div>