Justin
Justin

Reputation: 6251

Why does 'Hello World' plunker work in Chrome but not Firefox?

I'm trying to use Plunker with AngularJS and the default Hello World example works in Chrome but not in Firefox.

Here's a link to an example.

Steps to reproduce:
1. New Plunker
2. Choose AngluarJS > 1.2.x
3. A simple Hello World example is created
4. Choose Run

Chrome displays Hello World!
Firefox displays Hello {{name}}!

Is there something wrong with the AngularJS example that Plunker creates? Am i doing something wrong here?

I've reproduced this behavior in Windows XP and OSX
Firefox v27.0.1
Chrome v33.0.1750.146m

Upvotes: 2

Views: 9725

Answers (2)

jitendra varshney
jitendra varshney

Reputation: 3562

you have to tell browser what you are using if you are using angularjs then you have to add

if you add this on then scope of this for whole html'

    <html ng-app="plunker">

and if you add this then scope for angularjs is available for body

   <body ng-app="plunker">

it is fast comparison to including in html but main point is that you have to add ng-app

Upvotes: 0

rajasaur
rajasaur

Reputation: 5460

Your example dint work for me in Chrome either. I added the ng-app to the html tag so that Angular knows to load the module. So, instead of

<html>

it should be

<html ng-app="plunker">

Updated plnkr: http://plnkr.co/edit/d8Fb7o8OjUFdXOLKAaS7

Upvotes: 9

Related Questions