javascript - angular.element(...).scope(...) is undefined in s3 -


<html ng-app="myapp" ng-controller="myctrl" id="myctrl">  <head>   <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>  <script type="text/javascript" src="scripts/controller.js"></script>  </head>  <body> on here   </body>  </hmtl> 

this inside script.

  $(window).load(function(){       angular.element($("#myctrl")).scope().gobottom();         settimeout(function() {             $('#loading').fadeout( 400, "linear" );         }, 300);       });  }); 

this controller.js

 var app = angular.module('myapp', ['nganimate']);  app.controller('myctrl', function($scope, $http) {      $scope.gobottom = function(){          alert("success");              };       }); 

in local machine working.but when upload in s3.it shows error

angular.element(...).scope(...) undefined.

where doing wrong?


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -