From 2e1fbf56fdb9a548512782b7ba5870b72895e335 Mon Sep 17 00:00:00 2001 From: Joao Ribeiro Date: Tue, 3 May 2016 01:07:56 +0100 Subject: [PATCH] fix(package.json): update to angular beta.17 --- package.json | 12 ++++++------ src/core/element.directive.ts | 2 +- src/core/window.directive.ts | 2 +- src/plugin/index.render.directive.ts | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 9a5a258..b9a8125 100644 --- a/package.json +++ b/package.json @@ -6,24 +6,24 @@ "immutable": "^3.8.0" }, "devDependencies": { - "angular2": "~2.0.0-beta.15", - "commitizen": "~2.7.2", + "angular2": "~2.0.0-beta.17", + "commitizen": "~2.8.1", "cz-conventional-changelog": "~1.1.5", "es6-shim": "^0.35.0", "jasmine-core": "~2.4.1", "karma": "~0.13.21", - "karma-chrome-launcher": "~0.2.2", + "karma-chrome-launcher": "~1.0.1", "karma-firefox-launcher": "~0.1.7", "karma-jasmine": "~0.3.6", "karma-typescript-preprocessor": "0.0.21", "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.2", + "rxjs": "5.0.0-beta.6", "semantic-release": "^4.3.5", "systemjs": "~0.19.6", "tslint": "^3.2.1", "typescript": "~1.8.10", - "typings": "^0.7.12", - "zone.js": "~0.6.4" + "typings": "^0.8.1", + "zone.js": "~0.6.12" }, "bugs": { "url": "http://github.com/jonnybgod/ng2-scrollspy/issues" diff --git a/src/core/element.directive.ts b/src/core/element.directive.ts index 751ff01..13d6df2 100644 --- a/src/core/element.directive.ts +++ b/src/core/element.directive.ts @@ -1,5 +1,5 @@ import {Directive, Injectable, Input, OnInit, OnDestroy} from 'angular2/core'; -import {ReplaySubject} from 'rxjs/subject/ReplaySubject'; +import {ReplaySubject} from 'rxjs/ReplaySubject'; import {ScrollSpyService} from './service'; @Injectable() diff --git a/src/core/window.directive.ts b/src/core/window.directive.ts index 0c239e4..fc85617 100644 --- a/src/core/window.directive.ts +++ b/src/core/window.directive.ts @@ -1,5 +1,5 @@ import {Directive, Injectable, OnInit} from 'angular2/core'; -import {ReplaySubject} from 'rxjs/subject/ReplaySubject'; +import {ReplaySubject} from 'rxjs/ReplaySubject'; import {ScrollSpyService} from './service'; @Injectable() diff --git a/src/plugin/index.render.directive.ts b/src/plugin/index.render.directive.ts index 1860bc6..cc37c99 100644 --- a/src/plugin/index.render.directive.ts +++ b/src/plugin/index.render.directive.ts @@ -1,4 +1,4 @@ -import {Component, Injectable, Input, ElementRef, DynamicComponentLoader, OnInit, AfterViewInit, ComponentRef, OnDestroy, ChangeDetectionStrategy} from 'angular2/core'; +import {Component, Injectable, Input, ElementRef, DynamicComponentLoader, OnInit, AfterViewInit, ComponentRef, ViewContainerRef, ViewChild, OnDestroy, ChangeDetectionStrategy} from 'angular2/core'; import {BrowserDomAdapter} from 'angular2/platform/browser'; import {ScrollSpyService} from '../index'; @@ -21,6 +21,7 @@ export interface ScrollSpyIndexRenderOptions { }) export class ScrollSpyIndexRenderDirective implements OnInit, AfterViewInit, OnDestroy { @Input('scrollSpyIndexRender') options: ScrollSpyIndexRenderOptions; + @ViewChild('container', {read: ViewContainerRef}) viewContainerRef: ViewContainerRef; private defaultOptions: ScrollSpyIndexRenderOptions = { spyId: 'window', @@ -113,11 +114,10 @@ export class ScrollSpyIndexRenderDirective implements OnInit, AfterViewInit, OnD markup += ''; this.removeChildren(); - this.loader.loadIntoLocation( + this.loader.loadNextToLocation( this.compileToComponent(markup, [], () => this.getItemsToHighlight()), - this.elRef, - 'container' - ).then((ref) => { + this.viewContainerRef + ).then((ref: ComponentRef) => { this._children.push(ref); }); //this.DOM.setInnerHTML(this.el, markup); @@ -235,7 +235,7 @@ export class ScrollSpyIndexRenderDirective implements OnInit, AfterViewInit, OnD } removeChildren() { - this._children.forEach(cmp => cmp.dispose()); + this._children.forEach(cmp => cmp.destroy()); this._children = []; }