Updates notes
This commit is contained in:
@@ -27,19 +27,18 @@
|
||||
var model = this;
|
||||
model.$onInit = function () {
|
||||
// Ugh, due to the way we work with angularjs and property editors not being components and needing to use ng-include,
|
||||
// it means we need to expose things directly on the $scope so they can use them.
|
||||
// It also means we need to watch for changes and upate the $scope values.
|
||||
// it means we need to expose things directly on the $scope so they can use them.
|
||||
|
||||
$scope.block = model.block;
|
||||
$scope.api = model.api;
|
||||
$scope.index = model.index;
|
||||
};
|
||||
|
||||
// We need to watch for changes on primitive types and upate the $scope values.
|
||||
model.$onChanges = function (changes) {
|
||||
if (changes.index) {
|
||||
$scope.index = changes.index.currentValue;
|
||||
}
|
||||
|
||||
// TODO: Wouldn't we need to watch for any changes to model.block/api here too?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
model.$onInit = function () {
|
||||
// Ugh, due to the way we work with angularjs and property editors not being components and needing to use ng-include,
|
||||
// it means we need to expose things directly on the $scope so they can use them.
|
||||
// It also means we need to watch for changes and upate the $scope values.
|
||||
|
||||
|
||||
$scope.block = model.block;
|
||||
$scope.api = model.api;
|
||||
$scope.index = model.index;
|
||||
@@ -44,12 +43,11 @@
|
||||
$compile(shadowRoot)($scope);
|
||||
}
|
||||
|
||||
// We need to watch for changes on primitive types and upate the $scope values.
|
||||
model.$onChanges = function (changes) {
|
||||
if (changes.index) {
|
||||
$scope.index = changes.index.currentValue;
|
||||
}
|
||||
|
||||
// TODO: Wouldn't we need to watch for any changes to model.block/api here too?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user