我在 Sourcetree 中使用 Meld 来解决冲突。面临的问题是我必须选择本地或远程更改,我不能同时保留这两个更改。知道这在 Meld 中是否可行吗?
首先我得到这个错误没有ConnectionBackend的提供者!所以我将它导入我的规格虽然我没有在我的服务中导入它
然后我没有RequestOptions的提供者!我也将它导入我的规格,虽然我没有在我的服务中导入它
然后我收到此错误:无法解析RequestOptions的所有参数:(?).
有什么建议?
BookingDataService规范
import { TestBed, inject } from '@angular/core/testing';
import { BookingDataService } from './booking-data.service';
import { Http, ConnectionBackend, RequestOptions } from '@angular/http';
describe('BookingDataService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [BookingDataService, Http, ConnectionBackend, RequestOptions]
});
});
it('should be created', inject([BookingDataService], (service: BookingDataService) => {
expect(service).toBeTruthy();
}));
});
Run Code Online (Sandbox Code Playgroud)
appComponent规范
import { TestBed, async } from '@angular/core/testing';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
import …Run Code Online (Sandbox Code Playgroud) 我在常量中有regExp:
export const Constants = {
QUERY_PARAM_CONFIG: {
REGEX: /\+/gi,
REGEX_ENCODED: /%2B/g
}
};
Run Code Online (Sandbox Code Playgroud)
但是当我运行ng build时出现错误:
ERROR in app\app.module.ts(58,21): Error during template compile of 'AppModule'
Expression form not supported in 'Constants'
'Constants' contains the error at app\configuration\constants.ts.
Run Code Online (Sandbox Code Playgroud)
npm构建脚本:
ng build --prod --output-hashing none --sourcemaps=true
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?