mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
13 lines
479 B
TypeScript
13 lines
479 B
TypeScript
import {platformBrowser} from '@angular/platform-browser';
|
|
import {AppModuleNgFactory} from './app.ngfactory';
|
|
|
|
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory, {ngZone: 'noop'});
|
|
|
|
const helloWorld = document.querySelector('hello-world-el');
|
|
const input = document.querySelector('input[type=text]');
|
|
if(input && helloWorld){
|
|
input.addEventListener('input', e => {
|
|
const newText = (e.target as any).value;
|
|
helloWorld.setAttribute('name', newText);
|
|
});
|
|
}
|