The selector "my-app" did not match any elements

the selector radio
arthur 'gaps' hendrickson
the selector female singer
the selecter tour 2019
the selecter - on my radio
genre for the selector
the selecter members
the selecter songs

The problem is when I run my app, it works fine. But when I refresh it, most of the time I get below msg.

The selector "my-app" did not match any elements

But the strange thing is that many times when I refresh my app it works also.

So ultimately I have a strange behavior of my app and unable to figure this out. Sometimes it works sometimes doesn't...

Any suggestion, can't come up with code???

Note : I don't have complex structure or components yet but simple implementation.

This happened to me because I was importing my code in the head tag, so it was potentially running and attempting to bootstrap before the DOM was ready.

You can either move the script to the bottom of the body tag, or put the bootstrap code within an event listener:

document.addEventListener("DOMContentLoaded", function(event) {


<!DOCTYPE html>
    <meta charset="utf-8">
    <title>Example app</title>
  <script src="main.js" charset="utf-8"></script>

The Selecter, Selector Radio. @SelectorRadio @SelectorTV. Selecting the best UK music every week and sharing it with  2 Tone ska group formed in 1979 in Coventry, England. The original band split up in 1981 after releasing their second album. In 1991 Neol Davies and Pauline Black reformed The Selecter with new musicians and toured with the classic repertoire. Two years later Neol Davis left, leaving Pauline Black leading The Selecter through the 90's up to

Angular 4: I had to change <app-root></app-root> with <my-app></my-app> in the index.html file

The Selecter, 2 Tone ska group formed in 1979 in Coventry, England. The original band split up in 1981 after releasing their second album. In 1991 Neol Davies and Pauline​  The Selector made a lot of the sound track for good times for me and my friends in the early '80s. If you're a new ska fan, you must have these tunes. Read more

Things to do:

  1. Go to app.module.ts (to main modules, in most cases this is a name)
  2. Check if you have part "boostrap:" - if no add:

    bootstrap: [AppComponent] // where AppComponent is your main component

  3. Check if it works now, if not - go to AppComponent and check your selector. It should be same as tags in body in index.html

so index.html should contain something like this:


where instead of <app-root> you should use selector from main AppComponent

  1. If you are using your angular app in external website then you should consider using defer in headers for angular files

Selector Radio, A selector is a chain of one or more simple selectors separated by combinators. Combinators are: white space, ">", and "+". White space may appear between a  The Selecter Emerging from the same 2-Tone ska punk scene that birthed the likes of The Specials, Madness and The Beat, early singles from The Selecter like "Too Much Pressure," "On My Radio" and their self-titled "The Selecter" contained such an urgent brilliance that they cemented the band’s credibility for many years yet to come.

I got same issue when I use Angular Universal. But it is because I am using BrowserModule in main.node.ts, the solution is

  imports: [
    BrowserModule   // <- delete this will solve the issue

And check here for more info:

The Selecter | Discography, Selector Radio is on Mixcloud. Listen for free to their radio shows, DJ mix sets and Podcasts. Shared with more than 30 countries around the world, Selector connects a global audience to the ever-changing sounds of the UK. The show shines a light on scenes, festivals, towns and cities up and down the UK, to bring you anything and everything that’s exciting right now.

If you are using the angular2 / core template from here: you might find replacing the last few lines of boot-client.ts with the following helps (and avoids a lot of scary looking console errors when HMR reloads your page):

const bootApplication = () => { platform.bootstrapModule(AppModule); };
if (document.readyState === 'complete') {
    window.onload = () => bootApplication();
} else {
    document.addEventListener('DOMContentLoaded', bootApplication);

The Selector + The Beat Perform Together - Enjoy Yourself, “The Selection: Special Operations Experiment” takes a diverse group of men and women between the ages of 21-45 years old on an epic journey of self-discovery, facing their biggest fears and

The Selector - Missing Words, LIVE DATES. The Selecter Live Dates . Categories: Uncategorized. Post navigation. ABOUT. LATEST NEWS. LATEST NEWS January 25, 2017 ABOUT January 25, 2017 VIDEOS

The Selector's Pauline Black gives her opinions to Eric Blair 2018 , Shared with more than 30 countries around the world, Selector connects a global audience to anything and everything that’s exciting in the UK right now. We take you on a virtual tour of the UK, dropping you into the heart of cities like Bristol, Belfast, Cardiff and Glasgow to listen to the best emerging talent.

The Selecter - The Selecter, In CSS, selectors are patterns used to select the element(s) you want to style. Use our CSS Selector Tester to demonstrate the different selectors.

  • post the full error message or either portion of code or my-app component.
  • In IE11 - Potentially unhandled rejection [2] The selector "micropuppy-app" did not match any elements and In FF- 'EXCEPTION: The selector "my-app" did not match any elements… ..... ... ... .. and continue'
  • I've seen this couple of times - it's an IE issue, specifically how it loads scripts if I remember correctly. I'm afraid I don't know the fix for it, was long time ago, but hopefully it can point you in the right direction.
  • Sasxa, I m facing this problem in FF also. I don't know whats the problem. N feel helpless...
  • There is no main.js script inclusion in the plunker demos in the typescript documentation. Athough I do have the error.
  • I didn't get this error until I tried to bundle my compiled typescript files.
  • I faced the same issue while using webpack for module bundling.... and once i placed the script after .. body tag.. it's working...
  • You can also attach it to the window.onload event: window.onload = function(){ platformBrowserDynamic().bootstrapModule(AppModule); }
  • OMG I was banging my head on the wall for so long trying to figure this out and it was so simple. Thank you!
  • There appears to a be problem with the angular-cli creating an app-root reference in index.html file, while the Tour of Heroes tutorial entrypoint ts file refers instead to my-app. IMO the two should use the same naming convention since the Angular team have been recommending angular-cli as the best way to create a project.
  • Somewhat similar, just in case anybody facing this issue with webpack-dev-server (WDS) - I had built my app when selector was <app-root> and launched the app using WDS. Then I changed selector to <my-app> in my component and index.html. That is when I started getting above error. Problem was, index.html under 'dist' folder was not updated. I stopped WDS, built my app again and then launched app. Everything started working just fine!
  • <body> tag fixed it
  • Thank You! It Solved my problem.
  • This isn't true for the latest versions of Angular. These days BrowserModule replaces UniversalModule but an appId is passed as a parameter so that client and server can exchange. See here:…
  • This answer works for majority of cases for this error. This really should be the answer.