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


TypeScript platform-server.Parse5DomAdapter類代碼示例

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


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

示例1: initNodeAdapter

export function initNodeAdapter() {
  Parse5DomAdapter.makeCurrent();
}
開發者ID:BerniceChua,項目名稱:landr,代碼行數:3,代碼來源:node.ts

示例2:

// dom closure
import {Parse5DomAdapter} from '@angular/platform-server';
Parse5DomAdapter.makeCurrent();

export {provide, Inject, Optional, enableProdMode} from '@angular/core';

export * from './directives/index';

export * from './http/index';

export * from './pipes/index';

export * from './platform/index';

export * from './router/index';

export * from './bootloader';
export * from './helper';
export * from './ng_preboot';
export * from './render';
export * from './stringify_element';
export * from 'angular2-express-engine';
export * from 'angular2-hapi-engine';
開發者ID:BerniceChua,項目名稱:landr,代碼行數:23,代碼來源:node.ts

示例3: getDOM

import {ELEMENT_PROBE_PROVIDERS, BROWSER_SANITIZATION_PROVIDERS} from '@angular/platform-browser';
import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
import {DomRootRenderer} from '@angular/platform-browser/src/dom/dom_renderer';
import {RootRenderer} from '@angular/core/src/render/api';

import {TemplateParser} from '@angular/compiler/src/template_parser';

import {NodeDomRootRenderer_} from './dom/node_dom_renderer';
import {NodeXHRImpl} from './node_xhr_impl';
import {NodeSharedStylesHost} from './node_shared_styles_host';
import {NodeTemplateParser} from './node_template_parser';
import {NODE_PLATFORM_DIRECTIVES} from '../directives';

var CONST_EXPR = v => v;
import {Parse5DomAdapter} from '@angular/platform-server';
Parse5DomAdapter.makeCurrent(); // ensure Parse5DomAdapter is used
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
var DOM: any = getDOM();

export function initNodeAdapter() {
  Parse5DomAdapter.makeCurrent();
}

export const NODE_APP_PLATFORM_MARKER = new OpaqueToken('NodeAppPlatformMarker');

export const NODE_APP_PLATFORM: Array<any> = CONST_EXPR([
  ...PLATFORM_COMMON_PROVIDERS,
  new Provider(NODE_APP_PLATFORM_MARKER, {useValue: true}),
  new Provider(PLATFORM_INITIALIZER, {useValue: initNodeAdapter, multi: true}),
]);
開發者ID:BerniceChua,項目名稱:landr,代碼行數:30,代碼來源:node.ts


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