javascript - get undefined in angular -


i starting study on angular. created first plunker today , used angularjs 1.4 tempalate. getting error person not defined

what wrong code

var app = angular.module('plunker', []);  app.controller('mainctrl', function($scope) {  var person = { firstname: "kiran", lastname: "nandedkar" };  $scope.name = 'world';  $scope.person = person; }); 

here plunker

update not sure why question downvoted. trying in chrome browser , not working. tried on mozilla , working.

its working fine. code absolutely correct.

<p>hello {{person.firstname}}!</p> 

test code on html page


Comments

Popular posts from this blog

c# - ajax - How to receive data both html and json from server? -

c# - SharpDX Toolkit models rendering inside out -