01/10/2018, 17:27
Uncaught ReferenceError: angular is not defined
em chạy file html thì lại thông báo lỗi này… ai giúp em với
var app = angular.module('smartOffice',['ngResource','ngStorage', 'ngFileUpload','ui.router', 'ui.bootstrap','angularUtils.directives.dirPagination']);
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/1.0.19/angular-ui-router.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular-resource.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular-sanitize.js"></script>
<script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.5.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ngStorage/0.3.10/ngStorage.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/danialfarid-angular-file-upload/12.2.13/ng-file-upload.js"></script>
<body ng-app="smartOffice" ng-controller="CategoryNewController">
Bài liên quan
Thứ tự của các tập tin javascript cũng có thể gây lỗi này.
Ngoài ra nếu mã javascript chạy trước khi trang tải xong cũng gây lỗi.
Bởi thế mà: