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

Commit dcb0da8

Browse files
petebacondarwingkalpak
authored andcommitted
chore(docs): fix plnkrOpener to use $onInit
Since 1.6.0 does not preassign bindings before running the controller constructor function, we must move initialisation into the `$onInit` method.
1 parent b664e20 commit dcb0da8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/app/src/examples.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,11 @@ angular.module('examples', [])
159159

160160
};
161161

162-
// Initialize the example data, so it's ready when clicking the open button.
163-
// Otherwise pop-up blockers will prevent a new window from opening
164-
ctrl.prepareExampleData(ctrl.example.path);
165-
162+
ctrl.$onInit = function() {
163+
// Initialize the example data, so it's ready when clicking the open button.
164+
// Otherwise pop-up blockers will prevent a new window from opening
165+
ctrl.prepareExampleData(ctrl.example.path);
166+
};
166167
}]
167168
};
168169
}])

0 commit comments

Comments
 (0)