Skip to main content
deleted 6 characters in body; edited tags
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

This is how I can access the exact scope value, otherwise it will be $scope.type of local scope.

I am accessing this from the template in NSPopover. NSPopover directive has scope: true.

It's also inside the Angular bootstrap module.

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>

...

This is how I can access the exact scope value, otherwise it will be $scope.type of local scope.

I am accessing this from the template in NSPopover. NSPopover directive has scope: true.

It's also inside the Angular bootstrap module.

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>

...

This is how I can access the exact scope value, otherwise it will be $scope.type of local scope.

I am accessing this from the template in NSPopover. NSPopover directive has scope: true.

It's also inside the Angular bootstrap module.

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>
deleted 20 characters in body
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

This is how I have following html:can access the exact scope value, otherwise it will be $scope.type of local scope.

I am accessing this from the template in NSPopover. NSPopover directive has scope: true.

It's also inside the Angular bootstrap module.

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>

...

this is how I can acces the exact scope value otherwise it will be $scope.type of local scope

I am accesing this from the template in NSPopover. NS Popover directive has scope: true

It's also inside the angular bootstrap module.

I have following html:

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>

...

this is how I can acces the exact scope value otherwise it will be $scope.type of local scope

I am accesing this from the template in NSPopover. NS Popover directive has scope: true

It's also inside the angular bootstrap module.

This is how I can access the exact scope value, otherwise it will be $scope.type of local scope.

I am accessing this from the template in NSPopover. NSPopover directive has scope: true.

It's also inside the Angular bootstrap module.

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>

...

Source Link
vickk
  • 11
  • 1
  • 2

Accessing parent scope from directive

I have following html:

<label ng-class="{selected: $parent.$parent.$parent.type == current.type}" >
    <input type="radio" name="type" ng-value="current.type" ng-change="chooseOption()" ng-model="$parent.$parent.$parent.type"/>

...

this is how I can acces the exact scope value otherwise it will be $scope.type of local scope

I am accesing this from the template in NSPopover. NS Popover directive has scope: true

It's also inside the angular bootstrap module.