This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | AngularJS EDI, the "best" way of coding controller for minify is not supported. I show sample code | ||
---|---|---|---|
Product: | web | Reporter: | lassve |
Component: | AngularJS | Assignee: | Roman Svitanic <rsvitanic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ppisl |
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
lassve
2015-04-17 10:32:37 UTC
Sorry bad sample, new sample (function() { var AllOrdersController = function ($scope, customersFactory) { $scope.orders = null; $scope.ordersTotal = 0.0; $scope.totalType; function init() { customersFactory.getOrders() .success(function(orders) { $scope.orders = orders; getOrdersTotal(); }) .error(function(data, status, headers, config) { //handle error }); } function getOrdersTotal() { var total = 0; for (var i=0,len=$scope.orders.length;i<len;i++) { total += $scope.orders[i].total; } $scope.ordersTotal = total; $scope.totalType = ($scope.ordersTotal > 100) ? 'success' : 'danger'; } init(); }; AllOrdersController.$inject = ['$scope', 'customersFactory']; angular.module('customersApp') .controller('AllOrdersController', AllOrdersController); }()); Reproducible, works if the controller is declared as function declaration (even in IIFE) but when declared as function expression Product Version: NetBeans IDE Dev (Build 201504240001) Java: 1.8.0_40; Java HotSpot(TM) Client VM 25.40-b25 Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb) Changeset: b39bfa25cb77 Author: Roman Svitanic <rsvitanic@netbeans.org> Date: 2015-04-28 17:21 Message: #251909: No CC for AngularJS when controller function is assigned to a variable in IIFE - fixed Integrated into 'main-silver', will be available in build *201504290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b39bfa25cb77 User: Roman Svitanic <rsvitanic@netbeans.org> Log: #251909: No CC for AngularJS when controller function is assigned to a variable in IIFE - fixed Task #251909 - AngularJS EDI, the "best" way of coding controller for minify is not supported. I show sample code Thanks :) |