mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
chore(angular/providers): making progress on angular providers, fix merge issues
* chore(input): remove interface .d.ts file, move to .ts file * refactor(angular): start working on providers, etc * chore(angular/dependencies): update deps for angular demo
This commit is contained in:
17
packages/angular/src/util/util.ts
Normal file
17
packages/angular/src/util/util.ts
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
export function hydrateElement(element: any) {
|
||||
return element.componentOnReady();
|
||||
}
|
||||
|
||||
export function getElement(elementName: string) {
|
||||
return document.querySelector(elementName);
|
||||
}
|
||||
|
||||
export function ensureElementInBody(elementName: string) {
|
||||
let element = getElement(elementName);
|
||||
if (!element) {
|
||||
element = document.createElement(elementName);
|
||||
document.body.appendChild(element);
|
||||
}
|
||||
return element;
|
||||
}
|
Reference in New Issue
Block a user