0

I have to build basic sample in angularjs but it seems not working there. I am not getting what I am doing wrong. fiddle

var myApp = angular.module('myApp', []);
myApp.controller('myCtrl', function($scope) {
    $scope.name = "my name";
})
1
  • You can show the rest too? Commented Dec 24, 2015 at 10:23

2 Answers 2

1
  • You didn't choose angular version there.
  • You choose load type onLoad which won't work for angular.

Follow like the Image

enter image description here

JSFIDDLE

Sign up to request clarification or add additional context in comments.

Comments

0

var myApp = angular.module('myApp',[]);
myApp.controller('myCtrl',function($scope){
$scope.name= "jitender";
})
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp">  
  <div data-ng-controller="myCtrl">
    {{name}}
  </div>
</div>

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.