本文整理匯總了TypeScript中angular2/platform/browser.BrowserDomAdapter.query方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript BrowserDomAdapter.query方法的具體用法?TypeScript BrowserDomAdapter.query怎麽用?TypeScript BrowserDomAdapter.query使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angular2/platform/browser.BrowserDomAdapter
的用法示例。
在下文中一共展示了BrowserDomAdapter.query方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: 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;");
}
}
示例2: 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();
}
示例3: 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;
}
示例4: show
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)
}
示例5: 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, "**********");
}
}
示例6: constructor
constructor () {
this.head = DOM.query('head');
}