Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. angular.module('myApp', []);
  2. myApp.controller('ctrlName', function($scope){
  3. $scope.someVar = "some value";
  4. });
  5.  
  6. myApp.controller('ctrlName', function($scope){
  7. $scope.someVar = "some value within controller";
  8. })
  9. .directive('drtvName', function(){
  10. return {
  11. scope: {
  12. someVar: 'some value within directive'
  13. }
  14. }
  15. });
  16.  
  17. myApp.directive('drtvName', function(){
  18. scope: {/*not sure what it means when this is simply an empty object*/},
  19. controller: function(scope){
  20. /*is this completely separate from myApp.controller('name', function(){});*/
  21. }
  22. });
  23.  
  24. myApp.directive('drtvName', function(){
  25. controller: 'ctrlName',
  26. scope: {
  27. connectedToCtrlScopeOrJustHTMLView: 'dunno'
  28. }
  29. });
  30.  
  31. myApp.directive(drtvName', function(){
  32. scope: {},
  33. require: '^myParentController' //not sure what scope will be one line about with this option
  34. });
  35.  
  36. module.controller('myController', function () {...});
  37.  
  38. controller : 'myController'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement