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

Options not applied within transcluded directive #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/ui-ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,8 @@ angular.module('ui.ace', [])
}

// Listen for option updates
var updateOptions = function (current, previous) {
if (current === previous) return;
opts = angular.extend({}, options, scope.$eval(attrs.uiAce));
var updateOptions = function (newOptions) {
opts = angular.extend({}, options, newOptions);

opts.callbacks = [ opts.onLoad ];
if (opts.onLoad !== options.onLoad) {
Expand Down Expand Up @@ -309,7 +308,7 @@ angular.module('ui.ace', [])

// set the options here, even if we try to watch later, if this
// line is missing things go wrong (and the tests will also fail)
updateOptions(options);
updateOptions(opts);

elm.on('$destroy', function () {
acee.session.$stopWorker();
Expand Down