Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
completed: false
});
}
toggleCompletion(todo: Todo) {
todo.completed = !todo.completed;
}
}
@NgModule({
imports: [WorkerAppModule, FormsModule],
declarations: [TodoList, InputBox, TodoApp],
bootstrap: [TodoApp]
})
class AppModule {}
platformWorkerAppDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {WorkerAppModule} from '@angular/platform-webworker';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {ImageDemo} from './index_common';
@NgModule({imports: [WorkerAppModule], bootstrap: [ImageDemo], declarations: [ImageDemo]})
export class ExampleModule {
}
platformWorkerAppDynamic().bootstrapModule(ExampleModule);
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {AppModule} from './index_common';
platformWorkerAppDynamic().bootstrapModule(AppModule);
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {WorkerAppModule} from '@angular/platform-webworker';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {TodoApp} from './index_common';
@NgModule({imports: [WorkerAppModule, FormsModule], bootstrap: [TodoApp], declarations: [TodoApp]})
export class ExampleModule {
}
platformWorkerAppDynamic().bootstrapModule(ExampleModule);
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {WorkerAppModule} from '@angular/platform-webworker';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {AnimationCmp} from './index_common';
@NgModule({imports: [WorkerAppModule], bootstrap: [AnimationCmp], declarations: [AnimationCmp]})
export class ExampleModule {
}
platformWorkerAppDynamic().bootstrapModule(ExampleModule);
import './polyfills.ts';
import '@angular/core';
import '@angular/common';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import { AppModule } from './app/';
platformWorkerAppDynamic().bootstrapModule(AppModule);
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {WorkerAppModule} from '@angular/platform-webworker';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {App} from './index_common';
@NgModule({imports: [WorkerAppModule], bootstrap: [App], declarations: [App]})
export class ExampleModule {
}
platformWorkerAppDynamic().bootstrapModule(ExampleModule);
}
private calculate(val: string) {
if(val) {
let result = factorial(parseInt(val));
return Promise.resolve(result);
}
return Promise.resolve('');
}
}
@NgModule({imports: [WorkerAppModule], bootstrap: [Worker], declarations: [Worker]})
class WorkerModule {
}
platformWorkerAppDynamic().bootstrapModule(WorkerModule);
function factorial(num) {
if (num === 0) {
return 1;
}
else {
return (num * factorial(num - 1));
}
}
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {WorkerAppModule} from '@angular/platform-webworker';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {InputCmp} from './index_common';
@NgModule({imports: [WorkerAppModule], bootstrap: [InputCmp], declarations: [InputCmp]})
export class ExampleModule {
}
platformWorkerAppDynamic().bootstrapModule(ExampleModule);
import {NgModule} from '@angular/core';
import {WorkerAppModule} from '@angular/platform-webworker';
import {platformWorkerAppDynamic} from '@angular/platform-webworker-dynamic';
import {HelloCmp, RedDec} from './index_common';
@NgModule({
imports: [WorkerAppModule],
bootstrap: [HelloCmp],
declarations: [HelloCmp, RedDec],
})
export class ExampleModule {
}
platformWorkerAppDynamic().bootstrapModule(ExampleModule);