在aspnet webapi(mvc5)中禁用缩小

时间:2018-07-24 09:41:11

标签: asp.net-web-api2 asp.net-bundling

****** [已解决] *******

我无法在webapi项目(mvc5)中禁用JavaScript的压缩[NO .NET CORE]

遵循这些指示... ASP.NET Bundles how to disable minification

我已将其添加到global.asax

services.AddMvc()
    .AddJsonOptions(options => {
        options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
    });

该脚本使用

呈现在页面上
import {Component, ViewChild, ElementRef} from '@angular/core';
import * as THREEFULL from 'three-full';
import * as THREE from 'three';

//var STLLoader = require('three-stl-loader')(THREE);

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  @ViewChild('rendererContainer') rendererContainer: ElementRef;
  @ViewChild('inset') inset: ElementRef;

      ngOnInit() {

        // var loader = new STLLoader();
        // loader.load('assets/stls/Chiller.stl', data=>{});
        var loader = new THREEFULL.VRMLLoader();
        loader.load('assets/stls/house.wrl', data=>{});
      }    
}

******* [已编辑-已解决] *********

属性 System.Web.Optimization.BundleTable.EnableOptimizations = false; 在BundleConfig.RegisterBundles中被覆盖。 因此,将 EnableOptimizations = false 移至末尾即可使其正常工作!

0 个答案:

没有答案
相关问题