@angular/core#VERSION TypeScript Examples

The following examples show how to use @angular/core#VERSION. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: auth.client.ts    From auth0-angular with MIT License 6 votes vote down vote up
static createClient(configFactory: AuthClientConfig): Auth0Client {
    const config = configFactory.get();

    if (!config) {
      throw new Error(
        'Configuration must be specified either through AuthModule.forRoot or through AuthClientConfig.set'
      );
    }

    const { redirectUri, clientId, maxAge, httpInterceptor, ...rest } = config;

    return new Auth0Client({
      redirect_uri: redirectUri || window.location.origin,
      client_id: clientId,
      max_age: maxAge,
      ...rest,
      auth0Client: {
        name: useragent.name,
        version: useragent.version,
        env: {
          'angular/core': VERSION.full
        }
      } as any,
    });
  }
Example #2
Source File: analytics.spec.ts    From frontend-frameworks with MIT License 6 votes vote down vote up
describe('analytics', () => {
  let component: CloudinaryImageComponent;
  let fixture: ComponentFixture<CloudinaryImageComponent>;

  beforeEach(() => {
    SDKAnalyticsConstants.sdkSemver = '1.0.0';
    SDKAnalyticsConstants.techVersion = '10.2.5';
    TestBed.configureTestingModule({
      declarations: [ CloudinaryImageComponent ],
    });
    fixture = TestBed.createComponent(CloudinaryImageComponent);
    component = fixture.componentInstance;
  });

  afterEach(() => {
    SDKAnalyticsConstants.sdkSemver = APP_VERSION;
    SDKAnalyticsConstants.techVersion = VERSION.full;
  });

  it('creates an img with analytics', fakeAsync(() => {
    component.cldImg = cloudinaryImage;
    fixture.detectChanges();
    tick(0);
    const imgElement: HTMLImageElement = fixture.nativeElement;
    const img = imgElement.querySelector('img');

    expect(img.src).toBe('https://res.cloudinary.com/demo/image/upload/sample?_a=AKAABDS0');
  }));
});
Example #3
Source File: SDKAnalyticsConstants.ts    From frontend-frameworks with MIT License 5 votes vote down vote up
SDKAnalyticsConstants = {
  sdkSemver: APP_VERSION,
  techVersion: VERSION.full,
  sdkCode: 'K'
}
Example #4
Source File: info.component.ts    From tuxedo-control-center with GNU General Public License v3.0 5 votes vote down vote up
public angularVersion = VERSION.full;