javascript - AngulaJS no output -


i've started learning angularjs using tutorials on youtube. in tutorial there's code when coded , browser won't show properties. can me solve ?

this index.html

<!doctype html>  <html ng-app = "mymodule"> <head> <meta charset="utf-8"/>     <title>      </title>      <script src="angular/angular.min.js"></script>     <script src="script.js"></script> </head> <body>      <div ng-controller="mycontroller">         <div>             first name : {{ employee.firstname }}         </div>         <div>             last name : {{ employee.lastname }}         </div>         <div>             age : {{ employee.age }}         </div>         <!-- <div>             {{message}}         </div> -->     </div>  </body> </html> 

and script.js file

var myapp = angular.module("mymodule",[]); myapp.controller('mycontroller', function($scope){          var employee = {             firstname : "abcd",             lastname : "efgh",             age : 24             };          $scope.employee = employee;     }); 

in browser displays this

 first name :  last name :  age : 

why don't show property details ? mean "abcd" first name , on ?

edit :

still having same problem when i'm trying insert image. workds on codepen.io , here's link http://codepen.io/speco92/pen/jaqdav

but when checked on pc (localhost)image file won't load. other object properties loads.

here it's included screenshots of testmyangular.html , script.js , result in browser ! https://postimg.org/gallery/2g08oma4q/

can me solve ?

can please tell how running angular app?? directly opening pages in browser??

angular application cannot opened filepath on local machine because ofcross origin domain errors. need use server http-server


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -