Unable to get value from scope using directive

Sangeetha.V
<check_address address-id='address.addressId'></check_address> // html

app.directive('checkAddress', ['ajaxFactory', function (ajaxFactory) {
   return {
      restrict : 'EA',
      scope:{
        addressId : '='
      },
      templateUrl: 'address.html',  
      link: function (scope, elt ,attrs) {
    console.log(scope.addressId);
      }
     };
}]);

Unable to get scope.addressId. It is showing undefined. But my value is present in scope. If anyone know means please update. Thanks in advance.

Suresh Maruboina
app.directive('test', function(){
  return {
    restrict: 'A',
    scope: {
      myId: '@'
    },
    link: function(scope, iElement, iAttrs) {

      iAttrs.$observe('myId', function(value){
        alert(value);
      });      
    }
  };
});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Not able to get the value from the `directive` scope

From Dev

Get value from directive to $scope in controller

From Dev

Not able to get the value from the `directive` scope

From Dev

How to get updated value for isolated scope using angular directive?

From Dev

Changing a scope value from a directive

From Dev

Not able to get the = Local scope value inside directive

From Dev

Not able to update the `scope` value from directive function

From Dev

Change controller scope value from directive AngularJS

From Dev

Use, in child directive, value from parent directive and $scope

From Dev

Use, in child directive, value from parent directive and $scope

From Dev

How to change all directive scope value from any one of directive?

From Dev

AngularJS : How to change scope value from isolated scope within directive

From Dev

Get value from Directive into Controller

From Dev

$watch for value change from inside angular directive when using isolate scope

From Dev

AngularJS : passing model value from ng-repeat to ng-include to a directive using "=" in scope fails

From Dev

Copy scope property from another isolated scope using one directive

From Dev

Change a scope value in directive

From Dev

Unable to get the value set inside $scope

From Dev

Pass value from child directive isolated scope to parent directive isolated scope and trigger watch of parent

From Dev

AngularJs: Directive with function for template property. How to get scope value?

From Dev

AngularJs: Directive with function for template property. How to get scope value?

From Dev

Using scope in directive and service

From Dev

saving model value while using directive with isolated scope not working

From Dev

AngularJS : Change parent scope value from custom directive

From Dev

How to pass value back from angularjs directive scope with javascript event

From Dev

AngularJS : directive binding value to parent scope from template model

From Dev

Change Controller variable value from change in isolate scope directive

From Dev

AngularJS : directive binding value to parent scope from template model

From Dev

Angularjs directive - cannot retrieve value from isolated scope

Related Related

  1. 1

    Not able to get the value from the `directive` scope

  2. 2

    Get value from directive to $scope in controller

  3. 3

    Not able to get the value from the `directive` scope

  4. 4

    How to get updated value for isolated scope using angular directive?

  5. 5

    Changing a scope value from a directive

  6. 6

    Not able to get the = Local scope value inside directive

  7. 7

    Not able to update the `scope` value from directive function

  8. 8

    Change controller scope value from directive AngularJS

  9. 9

    Use, in child directive, value from parent directive and $scope

  10. 10

    Use, in child directive, value from parent directive and $scope

  11. 11

    How to change all directive scope value from any one of directive?

  12. 12

    AngularJS : How to change scope value from isolated scope within directive

  13. 13

    Get value from Directive into Controller

  14. 14

    $watch for value change from inside angular directive when using isolate scope

  15. 15

    AngularJS : passing model value from ng-repeat to ng-include to a directive using "=" in scope fails

  16. 16

    Copy scope property from another isolated scope using one directive

  17. 17

    Change a scope value in directive

  18. 18

    Unable to get the value set inside $scope

  19. 19

    Pass value from child directive isolated scope to parent directive isolated scope and trigger watch of parent

  20. 20

    AngularJs: Directive with function for template property. How to get scope value?

  21. 21

    AngularJs: Directive with function for template property. How to get scope value?

  22. 22

    Using scope in directive and service

  23. 23

    saving model value while using directive with isolated scope not working

  24. 24

    AngularJS : Change parent scope value from custom directive

  25. 25

    How to pass value back from angularjs directive scope with javascript event

  26. 26

    AngularJS : directive binding value to parent scope from template model

  27. 27

    Change Controller variable value from change in isolate scope directive

  28. 28

    AngularJS : directive binding value to parent scope from template model

  29. 29

    Angularjs directive - cannot retrieve value from isolated scope

HotTag

Archive