当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript _.reject方法代码示例

本文整理汇总了TypeScript中entcore._.reject方法的典型用法代码示例。如果您正苦于以下问题:TypeScript _.reject方法的具体用法?TypeScript _.reject怎么用?TypeScript _.reject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在entcore._的用法示例。


在下文中一共展示了_.reject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: async

 page: async (params) => {
     await sniplets.load();
     $scope.sniplets = _.reject(sniplets.sniplets, (s) => s.sniplet.hidden);
     Autosave.unwatchAll();
     openSite(params);
     applyIfNeeded();
 },
开发者ID:web-education,项目名称:pages,代码行数:7,代码来源:main.ts

示例2: function

				init: function(){
					var source = this.source;
					this.me = model.me;
					this.lang = lang;
					if(source.customLinks){
						this.links = source.customLinks;
						this.custom = true;
						this.snipletDisplay = {};
						return;
					}
                    this.source.landingPage = this.snipletResource.landingPage;
		    this.source._id = this.snipletResource._id;
                    this.links = _.map(this.snipletResource.pages.all, (page) => {
                        let href = '#/website/' + this.source._id + '/' + page.titleLink;
                        if (window.location.hash.startsWith('#/preview/')) {
                            href = '#/preview/' + this.source._id + '/' + page.titleLink;
                        }
						return {
							title: page.title,
                            href: href,
                            published: page.published,
							index: page.index
						}
                    });
					console.log(this.links);
                    this.links = _.reject(this.links, (l) => l.published === false);
					model.one('refresh-nav', () => this.init());
					this.$apply('links')
				},
开发者ID:web-education,项目名称:pages,代码行数:29,代码来源:behaviours.ts

示例3: function

 function (excludes) {
     scope.close();
     scope.toasterDisplayed.main = false;
     scope.selectedSubjectScheduled.scheduled_at.exclude = scope.selectedSubjectScheduled.scheduled_at.exclude.concat(excludes);
     scope.subjectCopyList = _.reject(scope.subjectCopyList, (copy) => {
         return copy.selected;
     });                       
 },
开发者ID:OPEN-ENT-NG,项目名称:exercizer,代码行数:8,代码来源:exclude.ts

示例4: async

 scope.deleteItem = async (item) => {
     scope.ngModel = _.reject(scope.ngModel, function (i) { return i === item; });
     scope.$apply('ngModel');
     scope.$eval(scope.ngChange);
     if (scope.itemsFound.length > 0) {
         setTimeout(async function () {
             await scope.doSearch();
         }, 0);
     }
 };
开发者ID:entcore,项目名称:entcore,代码行数:10,代码来源:recipientList.ts

示例5: route


//.........这里部分代码省略.........
	$scope.hasWorkflowZimbraExpert = () => {
       return model.me.hasWorkflow('fr.openent.zimbra.controllers.ZimbraController|preauth');
    };
	async function init(){
		await directory.account.open();
		await directory.account.loadChildren();
		await directory.account.load();
		$scope.me = model.me;
		directory.account.on('change', function(){
			$scope.$apply();
		});

		$scope.account = directory.account;
		$scope.previousMood = directory.account.mood.id;
		$scope.currentMotto = directory.account.motto;
		$scope.motto = {
			published: true,
			activated: false
		}
		loadThemeConf();
	}

	$scope.display = {};
	$scope.lang = lang;

	$scope.openView = function (view, name) {
		template.open(name, view);
	};
	$scope.containsView = function (name, view) {
		return template.contains(name, view);
	};

	$scope.moods = directory.User.prototype.moods;
		var moods = _.reject($scope.moods, function(mood){
			return mood.id === 'default';
		});
		moods.unshift({ id: "default", icon: "none", text:"userBook.mood.default" });
		$scope.availableMoods = moods;
	$scope.resetPasswordPath = '/auth/reset/password';

	$scope.birthDate = function(birthDate){
		if(birthDate){
			return moment(birthDate).format('D MMMM YYYY');
		}
		return '';
	};

	$scope.setThemePreferences = (themeName: string) => {
		const addedThemes = [];
			
		for(let name in $scope.account.themes){
			if($scope.account.themes[name]){
				addedThemes.push(name);
			}
		}

		if(addedThemes.length > 1){
			const keptTheme = $scope.themes.find(t => t.parent === 'theme-open-ent').child;
			http().put('/userbook/preference/theme', keptTheme);
		}
		else{
			http().put('/userbook/preference/theme', addedThemes[0]);
		}
	};

	$scope.translate = function(label){
开发者ID:entcore,项目名称:entcore,代码行数:67,代码来源:account.ts

示例6: function

directory.User.prototype.removeRelative = function(relative){
	this.relatives = _.reject(this.relatives, function(user){
		return user.id === relative.id;
	});
};
开发者ID:entcore,项目名称:entcore,代码行数:5,代码来源:model.ts


注:本文中的entcore._.reject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。