Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('myApp', []);
- myApp.controller('ctrlName', function($scope){
- $scope.someVar = "some value";
- });
- myApp.controller('ctrlName', function($scope){
- $scope.someVar = "some value within controller";
- })
- .directive('drtvName', function(){
- return {
- scope: {
- someVar: 'some value within directive'
- }
- }
- });
- myApp.directive('drtvName', function(){
- scope: {/*not sure what it means when this is simply an empty object*/},
- controller: function(scope){
- /*is this completely separate from myApp.controller('name', function(){});*/
- }
- });
- myApp.directive('drtvName', function(){
- controller: 'ctrlName',
- scope: {
- connectedToCtrlScopeOrJustHTMLView: 'dunno'
- }
- });
- myApp.directive(drtvName', function(){
- scope: {},
- require: '^myParentController' //not sure what scope will be one line about with this option
- });
- module.controller('myController', function () {...});
- controller : 'myController'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement