Posted 18 May 2018, 6:23 am EST
I have been trying to upgrade my project for wimo 5.20173.403 to the latest and having all kinds of issues.
first i removed all the files that were referenced before then removed the reference in package.config and then the npm command, that caused an issue with rxjs-compat so i had to npm install rxjs-compat. once i did that i have to change all the
import { Observable } from ‘rxjs/Observable’; to import { Observable } from ‘rxjs/Rx’; i have been unable to get around the next error.
Error: Unexpected token <
Evaluating http://localhost:5555/rxjs/Rx
Evaluating http://localhost:5555/app/shared/common/baseComponent.js
Evaluating http://localhost:5555/app/shared/index.js
Evaluating http://localhost:5555/app/applicationAdmin/home/home.component.js
Evaluating http://localhost:5555/app/applicationAdmin/index.js
Evaluating http://localhost:5555/app/app.routes.js
Evaluating http://localhost:5555/app/app.module.js
Evaluating http://localhost:5555/app/main.js
Loading app/main
here is the code i think it’s having an issue with
import { OnDestroy } from '@angular/core';
// import { Subject } from 'rxjs/Subject';
import { FormControl } from '@angular/forms';
import { Observable, Subject } from 'rxjs/Rx';
import { Utils } from '../../shared/index';
export class BaseComponent implements OnDestroy {
private _ngUnsubscribe = new Subject();
ngUnsubscribe = this._ngUnsubscribe.asObservable();
ngOnDestroy() {
this._ngUnsubscribe.next();
this._ngUnsubscribe.complete();
}
loadDropDown($obs: Observable<any>, field?: FormControl, prop?: string): Observable<any> {
return $obs.takeUntil(this.ngUnsubscribe)
.map(b => Utils.wj.setValue(b, field, prop));
}
monitorChanges(field: FormControl) {
return field.valueChanges
.takeUntil(this.ngUnsubscribe)
.debounceTime(500)
.distinctUntilChanged();
}
}
Any help would be appreciated.