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


TypeScript ng.controllers.push方法代码示例

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


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

示例1:

ng.services.push(openAnswerService);
ng.services.push(orderService);
ng.services.push(dragService );
ng.services.push(folderService );
ng.services.push(dateService );
ng.services.push(groupService );
ng.services.push(accessService );
ng.services.push(archivesService);
ng.services.push(correctionService);
ng.services.push(importService);

/**
 * Controllers
 */
for(let prop in controllers){
    ng.controllers.push(controllers[prop]);
}

routes.define(function($routeProvider){
    $routeProvider
        .when('/dashboard', {
            action: 'dashboard'
        })
        .when('/dashboard/student', {
            action: 'dashboardStudent'
        })
        .when('/dashboard/teacher/correction/:subjectScheduledId?', {
            action: 'dashboardTeacherCorrection'
        })
        .when('/dashboard/teacher/library', {
            action: 'dashboardTeacherLibrary'
开发者ID:OPEN-ENT-NG,项目名称:exercizer,代码行数:31,代码来源:app.ts

示例2:

import { switchSearch } from "./directives/switchSearch";

routes.define(function ($routeProvider) {
    $routeProvider
        .when("/read-mail/:mailId", {
            action: "readMail"
        })
        .when("/write-mail/:id", {
            action: "writeMail"
        })
        .when("/write-mail/:id/:type", {
            action: "writeMail"
        })
        .when("/write-mail", {
            action: "writeMail"
        })
        .when('/inbox', {
            action: 'inbox'
        })
        .when('/printMail/:mailId', {
            action: 'viewPrint'
        })
        .otherwise({
            redirectTo: "/inbox"
        })
});

ng.controllers.push(conversationController);
ng.controllers.push(printController);
ng.directives.push(recipientList);
ng.directives.push(switchSearch);
开发者ID:entcore,项目名称:entcore,代码行数:31,代码来源:app.ts

示例3:

import { routes, ng } from 'entcore';
import { activationController } from './controllers/activation';
import { forgotController } from './controllers/forgot';
import { resetController } from './controllers/reset';
import { loginController } from './controllers/login';

routes.define(function($routeProvider) {
	$routeProvider
		.when('/id', {
			action: 'actionId'
		})
		.when('/password', {
	  		action: 'actionPassword'
		})
		.otherwise({
		  	redirectTo: '/'
		})
});

ng.controllers.push(activationController);
ng.controllers.push(forgotController);
ng.controllers.push(resetController);
ng.controllers.push(loginController);

console.log('app');
开发者ID:entcore,项目名称:entcore,代码行数:25,代码来源:app.ts

示例4:

import { ng, routes } from 'entcore';
import * as controllers from './controllers';

for(let controller in controllers){
    ng.controllers.push(controllers[controller]);
}

routes.define(function($routeProvider){
	$routeProvider
		.otherwise({
			action: 'defaultView'
		});
})
开发者ID:entcore,项目名称:skeletons,代码行数:13,代码来源:app.ts

示例5:

import { model, routes, ng } from 'entcore';
import { Websites } from './model';

import { library } from './controllers/library';
import { edit } from './controllers/edit';
import { view } from './controllers/view';
import { main } from './controllers/main';

import { gridCell } from './directives/grid-cell';
import { gridRow } from './directives/grid-row';
import { gridResizable } from './directives/grid-resizable';
import { drawingGrid } from './directives/drawing-grid';
import { panel } from './directives/panel';
import { cssEditor } from './directives/css-editor';

ng.controllers.push(library);
ng.controllers.push(edit);
ng.controllers.push(view);
ng.controllers.push(main);

ng.directives.push(gridCell);
ng.directives.push(gridRow);
ng.directives.push(gridResizable);
ng.directives.push(drawingGrid);
ng.directives.push(panel);
ng.directives.push(cssEditor);

routes.define(function ($routeProvider) {
    $routeProvider
        .when('/website/:siteId', {
            action: 'site'
开发者ID:web-education,项目名称:pages,代码行数:31,代码来源:app.ts

示例6: if

		if (mode === "docsOnly") {
			appList = ["workspace","rack"];
		} else if (mode === "all") {
			appList = expected;
		} else if (mode === "apps") {
			appList = $scope.availableApps.filter(app => $scope.selectedApps[app]);
		}
		http.post('/archive/export', {'apps':appList}).then(function(res){
			$scope.loadingSpinner = true;
			setTimeout(function() {
				http.get('/archive/export/verify/' + res.data.exportId).then(function(status){
					window.location.href = '/archive/export/' + res.data.exportId;
					$scope.loadingSpinner = false;
					$scope.$apply();
				}).catch(function(){
					notify.error('archive.error');
					setTimeout(function() {
						window.location.reload();
					},3000);
				});
			},5000);
			$scope.loading = true;
			$scope.$apply();
		}).catch(function(){
			notify.error('export.already');
		})
	};
}]);

ng.controllers.push(archiveController);
开发者ID:entcore,项目名称:entcore,代码行数:30,代码来源:app.ts

示例7: http

        if(item === undefined){
            return;
        }
        var itemIndex = model.me.bookmarkedApps.indexOf(item);
        model.me.bookmarkedApps.splice(itemIndex, 1);
        $scope.$apply();
        http().putJson('/userbook/preference/apps', model.me.bookmarkedApps);
    };

    $scope.filterBookmark = function(item){
        return _.findWhere($scope.bookmarkedApps, {name : item.name})
    }

    $scope.drag = function(item, event){
        event.dataTransfer.setData('application/json', JSON.stringify(item));
    };

    $scope.searchDisplayName = function(item){
        return !$scope.display.searchText ||
                lang.removeAccents(lang.translate(item.displayName)).toLowerCase().indexOf(
                    lang.removeAccents($scope.display.searchText).toLowerCase()
            ) !== -1;
    };

    $scope.order = function(app){
        return lang.translate(app.displayName);
    }
}]);

ng.controllers.push(appController);
开发者ID:entcore,项目名称:entcore,代码行数:30,代码来源:app.ts

示例8:

            .otherwise({
                redirectTo: 'edit-me'
            });
    }
    else {
        $routeProvider
            .when('/search', {
                action: 'directory'
            })
            .when('/myClass', {
                action: 'myClass'
            })
            .when("/user-view/:userId", {
                action: "viewUser"
            })
            .when('/:userId', {
                action: 'viewUser'
            })
            .when('/group-view/:groupId', {
                action: 'viewGroup'
            })
            .otherwise({
                redirectTo: '/myClass'
            });
    }
});

ng.controllers.push(accountController);
ng.controllers.push(classAdminController);
ng.controllers.push(directoryController);
开发者ID:entcore,项目名称:entcore,代码行数:30,代码来源:app.ts


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