Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

How do you initialize the editor when directives get compiled after the controller? #5

@choxi

Description

@choxi

I haven't been able to get the example editor initialization to work because it looks like the directive is compiled after the controller is initialized. Here's an example:

In the html:

<div ng-controller="MyController">
  <div ui-ace scope-instance="foo"></div>
</div>

In the controller:

myAppModule.controller('MyController', [ '$scope', function($scope) {

  // this is undefined because
  // the controller is initialized 
  // before the directive is compiled
  var _editor = $scope.foo; 
}]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions