angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Map-control controller $scope

Open herrerodani opened this issue 12 years ago • 9 comments

$scope from map-control Controller doesn't inherit from parent's $scope.

Thank you very much.

herrerodani avatar Sep 18 '14 11:09 herrerodani

Use it as it is shown in the examples , it has its own controller . Examples being source code base. I think it's fine the way it is.

nmccready avatar Sep 18 '14 11:09 nmccready

Ok, I pointed it out to maintain the "angularjs DOM scope inheritance" philosophy and "controller as" usage.

Thank you very much for your answer.

herrerodani avatar Sep 18 '14 12:09 herrerodani

In that case the directives permission s just need to be changed. Easy please PR

nmccready avatar Sep 18 '14 12:09 nmccready

Sorry for my ignorance, What is 'PR'?

herrerodani avatar Sep 18 '14 12:09 herrerodani

Pull Request

gitnik avatar Sep 22 '14 15:09 gitnik

I may me misunderstanding the actual request here, but since we define a limited scope, why would you want to access the parent controller from within the directive?

gitnik avatar Sep 22 '14 15:09 gitnik

I think he is talking about a scope property that is not being allowed to bubble up and be found.

pseudo:

controller1
    scope:
        prop1: "something from controller 1"

contoller2:
    scope:
        prop2: "something from controller2"

<div ng-controller="controller1 >
    <directive ng-controller="controller2">
    <!-- not allowed currently, but could be -->
         {{prop1}} 
    </directive>
</div>

nmccready avatar Sep 22 '14 16:09 nmccready

ah ok I see. Yeah that would be nice

gitnik avatar Sep 22 '14 16:09 gitnik

closing due #1590

nmccready avatar Apr 06 '16 16:04 nmccready