Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net ./watch主要编译JS库文件,但有一个文件总是被缓存_Asp.net_Ember.js - Fatal编程技术网

Asp.net ./watch主要编译JS库文件,但有一个文件总是被缓存

Asp.net ./watch主要编译JS库文件,但有一个文件总是被缓存,asp.net,ember.js,Asp.net,Ember.js,我正在使用Ember,尽管我正在进行更改,但当我运行./watch时,它不会生成带有新代码的JavaScript文件-这很烦人-我正在进行手动更改,但这不是正确的解决方案,对吗?我甚至通过在文件夹中打开并手动更新ember文件上的代码对文件进行了更改-仍然是在app.js文件中编写旧代码 原因可能是什么?我正在使用Web Pack运行./watch并生成app.js文件 以下是我的余烬js代码: export default () => { IMS.registerController

我正在使用Ember,尽管我正在进行更改,但当我运行./watch时,它不会生成带有新代码的JavaScript文件-这很烦人-我正在进行手动更改,但这不是正确的解决方案,对吗?我甚至通过在文件夹中打开并手动更新ember文件上的代码对文件进行了更改-仍然是在app.js文件中编写旧代码

原因可能是什么?我正在使用Web Pack运行./watch并生成app.js文件

以下是我的余烬js代码:

export default () => { 
 IMS.registerController("case.details.assignedinspector.edit", {

    caseDetails: Ember.inject.controller('caseDetails'),
    caseId: Ember.computed.alias('caseDetails.model.imscase.id'),
    clearForm: function () {
        $('.modal').modal('hide');
    },
    actions: {
        close: function (id) {
            $('.modal').modal('hide');
            this.transitionToRoute('case.details');
        },

        async save() {
            var scope = this;

            //validating form
            if ($("#edit-assignedinspector-form").validate()) {
                var data = {                    
                    AssignedToInvestigators: Ember.get(scope, 'model.imscase.assignedToInvestigators'), //AssignedToInspectorId: $("#assignedInspectorSelect").chosen().val(),
                    CaseId: this.get('caseId')
                };
                try {
                    let response = await this.api('Case/UpdateAssignedInvestigators').post(data);
                    $('.modal').modal('hide');
                    toastr.success("Assigned Inspector Edit Saved.");
                    scope.transitionToRoute("case.details");
                    scope.get('caseDetails').refreshData();
                    scope.clearForm();
                } catch (ex) {
                    toastr.error("Error saving Assigned Inspector.");
                }
            }
            else {
                toastr.warning("Please fix the form", "Validation failed");
            }
        },
        didInsert: function () {
            $('#edit-assignedinspector-modal').modal();
        }
    }
}); 
 }
下面是如何在app.js文件中生成旧代码:

  save: function () {
    var _save = _asyncToGenerator(
    /*#__PURE__*/
    regeneratorRuntime.mark(function _callee() {
      var scope, data, response;
      return regeneratorRuntime.wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              scope = this; //validating form

              if (!$("#edit-assignedinspector-form").validate()) {
                _context.next = 19;
                break;
              }

              data = {
                AssignedToInspectorId: $("#assignedInspectorSelect").chosen().val(),
                CaseId: this.get('caseId')
              };
              _context.prev = 3;
              _context.next = 6;
              return this.api('Case/UpdateAssignedInspector').post(data);

            case 6:
              response = _context.sent;
              $('.modal').modal('hide');
              toastr.success("Assigned Inspector Edit Saved.");
              scope.transitionToRoute("case.details");
              scope.get('caseDetails').refreshData();
              scope.clearForm();
              _context.next = 17;
              break;

            case 14:
              _context.prev = 14;
              _context.t0 = _context["catch"](3);
              toastr.error("Error saving Assigned Inspector.");

            case 17:
              _context.next = 20;
              break;

            case 19:
              toastr.warning("Please fix the form", "Validation failed");

            case 20:
            case "end":
              return _context.stop();
          }
        }
      }, _callee, this, [[3, 14]]);
    }));

    function save() {
      return _save.apply(this, arguments);
    }

    return save;
  }()

它应该调用Case/UpdatesSignedInvestigators,而不是仍然调用Case/UpdatesSignedInspector,这是不正确的。

请阅读-总结是,这不是一种解决志愿者问题的理想方式,可能会对获得答案产生反作用。请不要将此添加到您的问题中。对不起,我把它放错了。我的道歉不清楚您是如何编译js的。您是否正在使用
ember cli
?您的ember版本是什么?我的ember版本是:“3.14.1”,但我如何知道我使用的是ember cli还是其他什么?