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# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -