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


TypeScript browser.BrowserDomAdapter類代碼示例

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


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

示例1: constructor

 constructor()
 {
   this._dom = new BrowserDomAdapter();
   this._body = this._dom.query("body");
   this._injector = angular.element(this._body).injector();
   this._globalScope = angular.element(this._body).scope();
 }
開發者ID:mariojunior,項目名稱:ng1Bridge,代碼行數:7,代碼來源:ng1Bridge.ts

示例2: Movie

import {provide} from "angular2/core";
import {BrowserDomAdapter} from 'angular2/platform/browser';
import {it, describe, expect, inject, beforeEachProviders, 
	   beforeEach, TestComponentBuilder, injectAsync} from "angular2/testing";
import {Observable} from "rxjs";
import {Movie} from "../app/models/Movie";
import {MovieList} from "../app/list/movie-list";
import {MovieService} from "../app/services/MovieService";
import {HTTP_PROVIDERS, Http} from "angular2/http";
import {Router} from "angular2/router";

BrowserDomAdapter.makeCurrent();

class FakeService extends MovieService {
	
	constructor() {
		super(null);
	}
	
	getAll() {	
		let movies = [[
			new Movie(1, "", 1, 1),
			new Movie(1, "", 1, 1),
			new Movie(1, "", 1, 1) 
		]];
		return Observable.from(movies);
	}
	
}

describe("The MovieList component", () => {
開發者ID:HansS,項目名稱:AtTheMovies-angular2-scott-allen,代碼行數:31,代碼來源:MovieListSpecB.ts

示例3: affichageDate

 affichageDate(value) {
     if (value == "limite") {
         var elem: any = this.dom.query('#choixDate');
         this.dom.setAttribute(elem, "style", "display:true;");
     } else {
         var elem: any = this.dom.query('#choixDate');
         this.dom.setAttribute(elem, "style", "display:none;");
     }
 }
開發者ID:PandoreProject,項目名稱:Pandora,代碼行數:9,代碼來源:modificationCompte.component.ts

示例4: meta

 protected meta (name: string): HTMLElement {
     let meta: HTMLElement;
     meta = DOM.query(`meta[${this.attribute}='${name}]'`);
     if (meta === null) {
         meta = DOM.createElement('meta');
         meta.setAttribute(this.attribute, name);
         this.head.appendChild(meta);
     }
     return meta;
 }
開發者ID:florinvoicuu,項目名稱:transactions,代碼行數:10,代碼來源:meta.ts

示例5:

	show (type, content) {

		var notification = this._dom.createElement('div');
		notification.innerHTML = content;
		notification.classList.add('df-notification', type);


		var notificationEl = this._dom.query('body').appendChild(notification);

		setTimeout(function(argument) {
			notificationEl.remove();
		}, 4000)
	}
開發者ID:raviurlams,項目名稱:angular2App,代碼行數:13,代碼來源:notification.ts

示例6: afficherMotDePasse

    afficherMotDePasse(id: number) {
        let motDePasse: string = this.utilisateurService.getUserById(id)["mdp"];
        var elem: any = this.dom.query('#affiche' + id);
        if (this.dom.getAttribute(elem, "class") == "no") {
            this.dom.setAttribute(elem, "class", "yes");
            this.dom.setAttribute(this.dom.query("#eyeLogo" + id), "class", "fa fa-eye-slash");
            this.dom.setText(elem, motDePasse);
        } else {
            this.dom.setAttribute(elem, "class", "no");
            this.dom.setAttribute(this.dom.query("#eyeLogo" + id), "class", "fa fa-eye");
            this.dom.setText(elem, "**********");
        }

    }
開發者ID:PandoreProject,項目名稱:Pandora,代碼行數:14,代碼來源:gestionCompte.component.ts

示例7:

	ngAfterViewInit() {
		this.DOM.on(this.el, this.analyticsOn, (event: any) => this.eventTrack(event))
	}
開發者ID:redlioncanada,項目名稱:ka-dish-landing,代碼行數:3,代碼來源:analytics.directive.ts

示例8: constructor

 constructor () {
     this.head = DOM.query('head');
 }
開發者ID:florinvoicuu,項目名稱:transactions,代碼行數:3,代碼來源:meta.ts

示例9: monCompteColor

 monCompteColor(colorMenu: string) {
     this.dom.setAttribute(this.dom.query("#cssmenu"), "class", colorMenu);
     let link = ['MonCompte', { colorMenu: colorMenu }];
     this._router.navigate(link);
     return;
 }
開發者ID:PandoreProject,項目名稱:Pandora,代碼行數:6,代碼來源:monCompte.component.ts

示例10: setTimeout

 setTimeout( () =>
 {
     this._dom.setStyle( this._elementRef.nativeElement, 'opacity', '1' );
 }, 100 );
開發者ID:johnarchuletta,項目名稱:followings.io,代碼行數:4,代碼來源:fade-in.directive.ts


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