blancoparis-tfc / tfcContabilidad

0 stars 0 forks source link

Mensajeria #74

Closed blancoparis-tfc closed 8 years ago

blancoparis-tfc commented 8 years ago

Al migrar a angular 2 beta.16, se han cambiado los componente para cargar los datos. El problema es que ahora el intoLocation no existe y tenemos que buscar un alternativa que nos valga.

blancoparis-tfc commented 8 years ago

Revisar esta nota del changelog

DynamicComponentLoader.loadIntoLocation has been removed. Use @ViewChild(‘myVar’, read: ViewContainerRef) to get hold of a ViewContainerRef at an element with variable myVar. Then call DynamicComponentLoader.loadNextToLocation. DynamicComponentLoader.loadNextToLocation now takes a ViewContainerRef instead of an ElementRef. AppViewManager is renamed into ViewUtils and is a mere private utility service.

blancoparis-tfc commented 8 years ago

Estoy probando con el componente loadAsRoot, pero no pilla las variables.

blancoparis-tfc commented 8 years ago

Mirando este error he visto que esta fallando el handel

blancoparis-tfc commented 8 years ago

El problema que estamos teniendo, es que cuando lo cargo en el modulo dentro de una clausura, no puedo acceder al objeto injectado, si le declaramos la función, tengo que ver como solucionarlo antes de seguir con el tema de la mensajeria.

angular2.dev.js:25644 STACKTRACE:BrowserDomAdapter.logError @ angular2.dev.js:25644ExceptionHandler.call @ angular2.dev.js:4865(anonymous function) @ angular2.dev.js:8167schedulerFn @ angular2.dev.js:7865SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ angular2.dev.js:7846NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ angular2.dev.js:8359NgZoneImpl.inner.inner.fork.onHandleError @ angular2.dev.js:2206ZoneDelegate.handleError @ angular2-polyfills.js:353Zone.runTask @ angular2-polyfills.js:285ZoneTask.invoke @ angular2-polyfills.js:449
angular2.dev.js:25644 TypeError: this.mensajeria is not a function
    at CatchSubscriber.GenericService.handleErrorV2 [as selector] (GenericService.ts:75)
    at CatchSubscriber.error (catch.ts:56)
    at MapSubscriber.Subscriber._error (Subscriber.ts:137)
    at MapSubscriber.Subscriber.error (Subscriber.ts:107)
    at XMLHttpRequest.onLoad (http.dev.js:676)
    at ZoneDelegate.invokeTask (angular2-polyfills.js:382)
    at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (angular2.dev.js:2181)
    at ZoneDelegate.invokeTask (angular2-polyfills.js:381)
    at Zone.runTask (angular2-polyfills.js:282)
    at XMLHttpRequest.ZoneTask.invoke (angular2-polyfills.js:449)BrowserDomAdapter.logError @ angular2.dev.js:25644ExceptionHandler.call @ angular2.dev.js:4866(anonymous function) @ angular2.dev.js:8167schedulerFn @ angular2.dev.js:7865SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ angular2.dev.js:7846NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ angular2.dev.js:8359NgZoneImpl.inner.inner.fork.onHandleError @ angular2.dev.js:2206ZoneDelegate.handleError @ angular2-polyfills.js:353Zone.runTask @ angular2-polyfills.js:285ZoneTask.invoke @ angular2-polyfills.js:449
Subscriber.ts:243 Uncaught TypeError: this.mensajeria is not a functionGenericService.handleErrorV2 @ GenericService.ts:75CatchSubscriber.error @ catch.ts:56Subscriber._error @ Subscriber.ts:137Subscriber.error @ Subscriber.ts:107onLoad @ http.dev.js:676ZoneDelegate.invokeTask @ angular2-polyfills.js:382NgZoneImpl.inner.inner.fork.onInvokeTask @ angular2.dev.js:2181ZoneDelegate.invokeTask @ angular2-polyfills.js:381Zone.runTask @ angular2-polyfills.js:282ZoneTask.invoke @ angular2-polyfills.js:449
blancoparis-tfc commented 8 years ago

El problema descrito anteriormente se ha resuelto.

.catch((error)=>this.handleErrorV2(error));

código malo

      .catch(this.handleErrorV2);