*this is my code*
*but it shows output for only parent directive*
*how can i bind the data to child directive*

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Dialog box creating </title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" 
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css";>
  <script 
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js";></script>
  <script 
src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js";></script>
  <script src= 
"http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js";></script>
  </head>
  <body>
  <div ng-app="Myapp">
<parent-directive>
   <child-directive>
   </child-directive>
</parent-directive>
</div>
<script type="text/javascript">
  var app=angular.module("Myapp",[]);
app.directive("parentDirective",function(){
return {
  restrict:"E",
template:"<p>Hello this is parent directive</p>",

};
  
});
app.directive("childDirective",function(){
return{
  restrict:"E",
template:"<p>Hello this is child directive</p>",
};
  
});
</script>

</body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to