1

I want to show a message if angular isn't supported eg for ie7 .

How would I do this? And would I do this on the index.html?

Currently I have this for Internet explorer less than IE9.

        <!--[if lt IE 9]>
            <p>You are using an outdated browser, please update your browser.
        <![endif]-->

How would I do this for Chrome and Firefox? EG:

• Chrome 45 and less • Mozilla Firefox 43 and less

AngularM
  • 15,982
  • 28
  • 94
  • 169
  • http://stackoverflow.com/questions/19742191/how-to-check-if-angular-is-loaded-correctly – prabin badyakar Mar 31 '16 at 10:45
  • The browsers supported by AngularJS are listed [here](https://docs.angularjs.org/misc/faq#what-browsers-does-angular-work-with-). I think it is up to you to check the browser version. [This question](http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser)'s answers might help you know the browser the user is using. – jeerbl Mar 31 '16 at 10:47
  • How would I show a banner message on the screen if angular isnt available? – AngularM Mar 31 '16 at 10:59

1 Answers1

0

there are many ways of showing or not showing the banner.

1 - in your index.html you could put an ng-include inside an ng-if and include the banner if angular isnt available

2 - you could put a CSS class on body using code if angular is available, if its not there then you know angular isnt available. Based on this class you can style CSS as follows ...

.mybanner {
  display:none;
}

.noangular .mybanner {
  display:block;
}

3 - you could use ui.router to intercept state changes and route to another route if angular isnt available.

user229044
  • 232,980
  • 40
  • 330
  • 338
danday74
  • 52,471
  • 49
  • 232
  • 283