Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

camel case not support in controller scope of directive? #12836

@edfungus

Description

@edfungus

I wrote a directive that takes in a parameter like twoWords (camel case) and when I try to pull in the variable from scope in a controller, it doesn't work. One the other hand, twowords works perfectly.

//part of my directive
var controller = ['$scope', function ($scope) {
    console.log($scope.twoWords); //this doesn't work
    console.log($scope.twowords); //this works
}];
return {
      restrict: 'EA',
      scope: {
        twoWords: '=',
        twowords: '='
      },
      controller: controller,
      templateUrl: template
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions