本文整理汇总了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;未经允许,请勿转载。 |
请发表评论