How to use the @dojo/framework/routing/Outlet.Outlet function in @dojo/framework

To help you get started, we’ve selected a few @dojo/framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dojo / examples / todo-mvc-kitchensink / src / outlets / TodoDetailsOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';
import { MapParamsOptions } from '@dojo/framework/routing/interfaces';

import TodoDetailsContainer from './../containers/TodoDetailsContainer';

export default Outlet(TodoDetailsContainer, 'edit', { mapParams: ({ params, router }) => {
	return {
		id: params.id,
		onRequestExit() {
			const link = router.link('view');
			link && router.setPath(link);
		}
	};
}});
github dojo / examples / realworld / src / outlets / ArticleOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';
import { MapParamsOptions } from '@dojo/framework/routing/interfaces';

const mapParams = ({ params }: MapParamsOptions) => {
	return {
		slug: params.slug
	};
};

export const ArticleOutlet = Outlet('article', 'article', { mapParams });
github dojo / dojo.io / site / source / tutorials / 1060_data_driven_widgets / demo / finished / biz-e-corp / src / outlets / WorkerContainerOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';

import WorkerContainer from './../widgets/WorkerContainer';

export const WorkerContainerOutlet = Outlet({ index: WorkerContainer }, 'directory');

export default WorkerContainerOutlet;
github dojo / dojo.io / site / source / tutorials / 1060_data_driven_widgets / demo / initial / biz-e-corp / src / outlets / BannerOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';

import Banner from './../widgets/Banner';

export const BannerOutlet = Outlet({ index: Banner }, 'home');

export default BannerOutlet;
github dojo / dojo.io / site / source / tutorials / 1060_data_driven_widgets / demo / finished / biz-e-corp / src / outlets / BannerOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';

import Banner from './../widgets/Banner';

export const BannerOutlet = Outlet({ index: Banner }, 'home');

export default BannerOutlet;
github dojo / examples / todo-mvc-kitchensink / src / outlets / TodoListOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';
import { MapParamsOptions } from '@dojo/framework/routing/interfaces';

import TodoList from './../widgets/TodoList';

export default Outlet(TodoList, 'view', { mapParams: ({ queryParams, params, router }) => {
	return {
		view: params.view,
		filter: queryParams.filter,
		editTodo({ id }: {id: string}) {
			const link = router.link('edit', { id });
			link && router.setPath(link);
		}
	};
}});
github dojo / dojo.io / site / source / tutorials / 1030_routing / demo / finished / biz-e-corp / src / outlets / BannerOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';

import Banner from './../widgets/Banner';

export const BannerOutlet = Outlet({ index: Banner }, 'home');

export default BannerOutlet;
github dojo / examples / realworld / src / outlets / LoginOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';

export const LoginOutlet = Outlet('login', 'login');
github dojo / examples / realworld / src / outlets / HomeOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';
import { Home } from './../widgets/Home';

export const HomeOutlet = Outlet({ index: Home }, 'home');
github dojo / examples / realworld / src / outlets / SettingsOutlet.ts View on Github external
import { Outlet } from '@dojo/framework/routing/Outlet';

export const SettingsOutlet = Outlet('settings', 'settings');