我在尝试运行Angular2应用时遇到错误。
ERROR in ./src/vendor.browser.ts
Module not found: Error: Can't resolve 'expose' in '/Users/adrien/Dev/go/src/github.com/adrien3d/base-front/src'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'expose-loader' instead of 'expose',
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
@ ./src/vendor.browser.ts 4:0-31
以下是相关文件: vendor.browser.ts:
// Vendors
require("expose?jQuery!jquery");
import 'metismenu';
import 'bootstrap';
// Angular 2
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import '@angular/forms';
import '@angular/http';
import '@angular/router';
// RxJS
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mergeMap';
我没有清楚地看到这个错误的意义,因为我没有尝试使用暴露,任何想法?
答案 0 :(得分:1)
mydict = {'A': Counter({'food': 30, 'menu': 19, 'good': 15}), 'B': Counter({'one': 5, 'chicken': 10})}
mydict['A'].update(['price'])
mydict['B'].update(['cow'])
print mydict
{'A': Counter({'food': 30, 'menu': 19, 'good': 15, 'price': 1}), 'B': Counter({'chicken': 10, 'one': 5, 'cow': 1})}