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