Skip to content

Commit

Permalink
fix(ng2.UIRouter): Update ui-router for ng2 rc.1
Browse files Browse the repository at this point in the history
Closes #2722
  • Loading branch information
christopherthielen committed May 4, 2016
1 parent 45c0758 commit 3219406
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 29 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ui-router",
"description": "State-based routing for Javascript",
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"scripts": {},
"homepage": "http://angular-ui.github.com/ui-router",
"contributors": [
Expand Down Expand Up @@ -41,7 +41,13 @@
},
"license": "MIT",
"devDependencies": {
"angular2": "^2.0.0-beta.17",
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1",
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
"rxjs": "^5.0.0-beta.6",
"zone.js": "^0.6.12",
"babel-core": "^5.8.14",
"conventional-changelog": "^1.1.0",
"conventional-changelog-cli": "^1.1.1",
Expand Down Expand Up @@ -72,7 +78,6 @@
"lodash": "^4.5.1",
"phantomjs-polyfill": "0.0.1",
"reflect-metadata": "=0.1.2",
"rxjs": "=5.0.0-beta.2",
"shelljs": "~0.6.0",
"systemjs": "^0.18.4",
"ts-loader": "^0.8.1",
Expand All @@ -81,11 +86,6 @@
"typescript": "~1.8.0",
"webpack": "1.x",
"webpack-dev-server": "1.x",
"yargs": "^4.2.0",
"zone.js": "^0.6.6"
},
"dependencies": {
"rxjs": "^5.0.0-beta.6",
"zone.js": "^0.6.12"
"yargs": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/ng2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ui-router-ng2",
"description": "State-based routing for Angular 2",
"peerDependencies": {
"angular2": ">2.0.0-alpha.12"
"@angular/core": ">=2.0.0-rc.1"
},
"main": "ng2.js",
"typings": "ng2.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/ng2/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ module.exports = {
},

externals: {
"angular2/core": { root: 'angular2/core', amd: 'angular2/core', commonjs2: 'angular2/core', commonjs: 'angular2/core' }
"@angular/core": { root: '@angular/core', amd: '@angular/core', commonjs2: '@angular/core', commonjs: '@angular/core' }
}
};
2 changes: 1 addition & 1 deletion src/ng2/componentUtil.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {InputMetadata, ComponentMetadata} from "angular2/core";
import {InputMetadata, ComponentMetadata} from "@angular/core";

export const ng2ComponentInputs = (ng2CompClass) => {
/** Get "@Input('foo') _foo" inputs */
Expand Down
2 changes: 1 addition & 1 deletion src/ng2/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {StateDeclaration, _ViewDeclaration} from "../state/interface";
import {ParamDeclaration} from "../params/interface";
import {IInjectable} from "../common/common";
import {Transition} from "../transition/transition";
import {Type} from "angular2/core";
import {Type} from "@angular/core";

/**
* The StateDeclaration object is used to define a state or nested state.
Expand Down
4 changes: 2 additions & 2 deletions src/ng2/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* - When bootstrapping: include the [[UIROUTER_PROVIDERS]] and define a provider for your [[UIRouterConfig]]
*
* ```js
* import {provide} from "angular2/core";
* import {provide} from "@angular/core";
* import {bootstrap} from 'angular2/platform/browser';
* import {UIRouterConfig, UiView, UIROUTER_PROVIDERS} from "ui-router-ng2";
* import {MyUIRouterConfig} from "./router.config";
Expand All @@ -46,7 +46,7 @@
*
* @preferred @module ng2
*/ /** */
import {Provider, provide} from "angular2/core";
import {Provider, provide} from "@angular/core";
import {UIRouter} from "../router";
import {Node} from "../path/node";
import {StateRegistry} from "../state/stateRegistry";
Expand Down
8 changes: 4 additions & 4 deletions src/ng2/uiSref.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/** @module ng2_directives */ /** */
import {UIRouter} from "../router";
import {Directive, Inject, Input} from "angular2/core";
import {Optional} from "angular2/core";
import {ElementRef} from "angular2/core";
import {Renderer} from "angular2/core";
import {Directive, Inject, Input} from "@angular/core";
import {Optional} from "@angular/core";
import {ElementRef} from "@angular/core";
import {Renderer} from "@angular/core";
import {UiView, ParentUiViewInject} from "./uiView";
import {extend} from "../common/common";

Expand Down
2 changes: 1 addition & 1 deletion src/ng2/uiSrefActive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @module ng2_directives */ /** */
import {Directive, Input, ElementRef, Host, Renderer} from "angular2/core";
import {Directive, Input, ElementRef, Host, Renderer} from "@angular/core";
import {UiSrefStatus, SrefStatus} from "./uiSrefStatus";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ng2/uiSrefStatus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @module ng2_directives */ /** */
import {Directive, Output, EventEmitter} from "angular2/core";
import {Directive, Output, EventEmitter} from "@angular/core";
import {StateService} from "../state/stateService";
import {UiSref} from "./uiSref";
import {Node} from "../path/node";
Expand Down
16 changes: 8 additions & 8 deletions src/ng2/uiView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import {
Component, ComponentResolver, ComponentFactory,
ViewContainerRef, ReflectiveInjector
} from 'angular2/core';
import {provide} from "angular2/core";
import {Input} from "angular2/core";
import {ComponentRef} from "angular2/core";
import {Type} from "angular2/core";
} from '@angular/core';
import {provide} from "@angular/core";
import {Input} from "@angular/core";
import {ComponentRef} from "@angular/core";
import {Type} from "@angular/core";

import {UIRouter} from "../router";
import {trace} from "../common/trace";
import {Inject} from "angular2/core";
import {Inject} from "@angular/core";
import {ViewContext, ViewConfig} from "../view/interface";
import {Ng2ViewDeclaration} from "./interface";
import {ng2ComponentInputs} from "./componentUtil";
Expand Down Expand Up @@ -96,7 +96,7 @@ export interface ParentUiViewInject {
export class UiView {
@Input('name') name: string;
@Input('ui-view') set _name(val) { this.name = val; }
componentRef: ComponentRef;
componentRef: ComponentRef<any>;
deregister: Function;
uiViewData: any = {};

Expand Down Expand Up @@ -161,7 +161,7 @@ export class UiView {
// Get the component class from the view declaration. TODO: allow promises?
let componentType = <Type> viewDecl.component;

let createComponent = (factory: ComponentFactory) => {
let createComponent = (factory: ComponentFactory<any>) => {
let parentInjector = this.viewContainerRef.injector;
let childInjector = ReflectiveInjector.resolveAndCreate(rawProviders, parentInjector);
let ref = this.componentRef = this.viewContainerRef.createComponent(factory, undefined, childInjector);
Expand Down

0 comments on commit 3219406

Please sign in to comment.