小编Mom*_*men的帖子

GIT Meld 如何在合并期间保持两个更改?

我在 Sourcetree 中使用 Meld 来解决冲突。面临的问题是我必须选择本地或远程更改,我不能同时保留这两个更改。知道这在 Meld 中是否可行吗?

git meld

6
推荐指数
1
解决办法
1661
查看次数

Angular CLI Jasmine Unit测试错误:无法解析RequestOptions的所有参数:(?)

首先我得到这个错误没有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)

jasmine angular

2
推荐指数
1
解决办法
2457
查看次数

ng build由于regExp而报错

我在常量中有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)

有任何想法吗?

regex typescript angular-cli angular2-aot angular

2
推荐指数
1
解决办法
1433
查看次数

标签 统计

angular ×2

angular-cli ×1

angular2-aot ×1

git ×1

jasmine ×1

meld ×1

regex ×1

typescript ×1