當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript maquette.createProjector函數代碼示例

本文整理匯總了TypeScript中maquette.createProjector函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript createProjector函數的具體用法?TypeScript createProjector怎麽用?TypeScript createProjector使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了createProjector函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: fetchData

let initialize = () => {

  projector = maquette.createProjector()

  fetchData().then((response) => {
    document.body.innerHTML = '';
    createLevelSectionComponents(response.data)
    projector.append(document.body, renderMaquette)
  });

  teamToggleComponent = createTeamToggleComponent(projector, { getActiveTeam: getActiveTeam, setActiveTeam: setActiveTeam })
}
開發者ID:timohofmeijer,項目名稱:productontwikkelingscockpit,代碼行數:12,代碼來源:next-up-app.ts

示例2: createProjector

import {createProjector} from 'maquette';
import {renderMaquette} from './app';

createProjector({}).append(document.body, renderMaquette);
開發者ID:jcfranco,項目名稱:maquette-typescript-jsx-starter,代碼行數:4,代碼來源:main.ts

示例3: createProjector

///<reference path='../../typings/es6-promise/es6-promise.d.ts' />
///<reference path='../../typings/whatwg-fetch/whatwg-fetch.d.ts' />

import {createProjector} from 'maquette';
import {createPlanningApplication} from './app';

(window as any).require('whatwg-fetch');

let projector = createProjector({});
let app = createPlanningApplication(projector);
projector.append(document.body, app.renderMaquette);
開發者ID:smeetsmeister,項目名稱:planning-cockpit,代碼行數:11,代碼來源:main.ts

示例4: constructor

 constructor() {
     this.projector = createProjector();
 }
開發者ID:dopatraman,項目名稱:lucca,代碼行數:3,代碼來源:VNodeRenderer.ts

示例5: createProjector

import 'es6-shim';
import { createProjector } from 'maquette';
import store from './store';
import app from './components/app';
import history from './history';
import navigate from './actions/navigate';

const projector = createProjector({});

/**
 * Whenever the store changes as the result of an action
 * tell Maquette to schedule another render of the virtual
 * DOM.
 */
store.subscribe(function () {
  projector.scheduleRender();
});

/**
 * Define the projector that will render the virtual DOM
 * and update the real DOM. We will simply append the app
 * to the <body>.
 */
projector.append(document.body, function () {
  return app(store.getState());
});

/**
 * Listen for history events and dispatch a new action to
 * the store to handle the new location.
 */
開發者ID:patrickarlt,項目名稱:maquette-redux-example,代碼行數:31,代碼來源:index.ts


注:本文中的maquette.createProjector函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。