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
Post a Comment