Câu hỏi được gắn thẻ «angularjs»

Sử dụng cho các câu hỏi về AngularJS (1.x), khung JavaScript nguồn mở. KHÔNG sử dụng thẻ này cho các phiên bản Angular 2 trở lên; thay vào đó, sử dụng thẻ [góc].


9
Bộ định tuyến UI AngularJS - thay đổi url mà không cần tải lại trạng thái
Hiện tại dự án của chúng tôi đang sử dụng mặc định $routeProvidervà tôi đang sử dụng "hack" này để thay đổi urlmà không cần tải lại trang: services.service('$locationEx', ['$location', '$route', '$rootScope', function($location, $route, $rootScope) { $location.skipReload = function () { var lastRoute = $route.current; var un = $rootScope.$on('$locationChangeSuccess', function …

6
Đang khởi tạo chọn với AngularJS và ng-repeat
Tôi đang cố gắng chọn hộp chọn để bắt đầu với tùy chọn điền sẵn bằng cách sử dụng ng-repeat với AngularJS 1.1.5. Thay vào đó, lựa chọn luôn bắt đầu với không có gì được chọn. Nó cũng có một tùy chọn trống mà tôi không muốn. Tôi nghĩ …


10
$ áp dụng đã có lỗi trong tiến trình
Dấu vết ngăn xếp: Error: $apply already in progress at Error (<anonymous>) at beginPhase (file:///android_asset/www/built.min.js:7:22740) at Object.Scope.$apply (file:///android_asset/www/built.min.js:7:25967) at navigator.geolocation.getCurrentPosition.that (file:///android_asset/www/built.min.js:13:8670) at Object.geolocation.getCurrentPosition (file:///android_asset/www/plugins/org.apache.cordova.core.geolocation/www/geolocation.js:122:13) at Object.getCurrentPosition (file:///android_asset/www/built.min.js:13:8589) at Object.getCurrentPosition (file:///android_asset/www/built.min.js:13:8277) at Object.getCurrentCity (file:///android_asset/www/built.min.js:13:8941) at Object.$scope.locateDevice (file:///android_asset/www/built.min.js:13:10480) at file:///android_asset/www/built.min.js:7:12292:7 đề cập đến mã này http://pastebin.com/B9V6yvFu getCurrentPosition: cordovaReady(function (onSuccess, onError, options) { …






7
Cách gọi $ http Cuộc gọi đồng bộ với AngularJS
Có cách nào để thực hiện cuộc gọi đồng bộ với AngularJS không? Tài liệu AngularJS không rõ ràng hoặc bao quát để tìm ra một số nội dung cơ bản. TRÊN DỊCH VỤ: myService.getByID = function (id) { var retval = null; $http({ url: "/CO/api/products/" + id, method: "GET" …
132 http  angularjs 

16
Cách tạo bộ lọc lặp lại ra kết quả trùng lặp
Tôi đang chạy đơn giản ng-repeat tệp JSON và muốn lấy tên danh mục. Có khoảng 100 đối tượng, mỗi đối tượng thuộc một danh mục - nhưng chỉ có khoảng 6 danh mục. Mã hiện tại của tôi là: <select ng-model="orderProp" > <option ng-repeat="place in places" value="{{place.category}}">{{place.category}}</option> </select> Đầu …



17
Lỗi AngularJS: Yêu cầu nguồn gốc chéo chỉ được hỗ trợ cho các sơ đồ giao thức: http, dữ liệu, tiện ích mở rộng chrome, https
Tôi có ba tập tin của một ứng dụng js góc rất đơn giản index.html <!DOCTYPE html> <html ng-app="gemStore"> <head> <script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js'></script> <script type="text/javascript" src="app.js"></script> </head> <body ng-controller="StoreController as store"> <div class="list-group-item" ng-repeat="product in store.products"> <h3>{{product.name}} <em class="pull-right">{{product.price | currency}}</em></h3> </div> <product-color></product-color> </body> </html> sản phẩm-color.html <div class="list-group-item"> <h3>Hello <em …

Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.