本文整理汇总了TypeScript中angularjs-for-webpack.isDefined函数的典型用法代码示例。如果您正苦于以下问题:TypeScript isDefined函数的具体用法?TypeScript isDefined怎么用?TypeScript isDefined使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isDefined函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
$scope.$watch('meta', function (value) {
if (angular.isDefined(value)) {
if (angular.isDefined($scope.events)) {
$scope.dataLoaded = true;
$scope.getEventCount();
}
}
});
示例2: function
scope.$watch('selectedView.view', function (value) {
if (angular.isDefined(scope.selectedView.view)) {
if (angular.isDefined(scope.redirectView)) {
const view_url = '/sketch/' + scope.sketchId + '/explore/view/' + scope.selectedView.view.id + '/';
window.location.href = view_url;
} else {
timesketchApi.getView(scope.sketchId, scope.selectedView.view.id).success(function (data) {
scope.query = data.objects[0].query_string;
scope.filter = angular.fromJson(data.objects[0].query_filter);
scope.queryDsl = angular.fromJson(data.objects[0].query_dsl);
ctrl.search(scope.query, scope.filter, scope.queryDsl);
});
}
}
});
示例3: function
scope.$watch('selectedView.view', function (value) {
if (angular.isDefined(scope.selectedView.view)) {
const el = (
'<ts-story-event-list contenteditable="false" sketch-id="'
+ scope.sketchId + '" view-id="' + scope.selectedView.view.id
+ '"></ts-story-event-list>'
);
const childNode = $compile(el)(scope);
element.hide();
element.after(childNode);
// Focus the next paragraph
const next_paragraph = $(childNode.next('p'));
const range = document.createRange();
const sel = window.getSelection();
range.setStart(next_paragraph[0], 0);
range.collapse(true);
sel.removeAllRanges();
sel.addRange(range);
}
});