We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9844a2 commit a8210d0Copy full SHA for a8210d0
integration/ng_elements/src/main.ts
@@ -3,11 +3,11 @@ import {AppModuleNgFactory} from './app.ngfactory';
3
4
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory, {ngZone: 'noop'});
5
6
-const helloWorldEl = document.querySelector('hello-world-el');
+const helloWorld = document.querySelector('hello-world-el');
7
const input = document.querySelector('input[type=text]');
8
-if(input){
+if(input && helloWorld){
9
input.addEventListener('input', e => {
10
const newText = (e.target as any).value;
11
- helloWorldEl.setAttribute('name', newText);
+ helloWorld.setAttribute('name', newText);
12
});
13
}
0 commit comments