Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular-ui/ui-router
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.22
Choose a base ref
...
head repository: angular-ui/ui-router
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.0.23
Choose a head ref
  • 14 commits
  • 10 files changed
  • 3 contributors

Commits on Jan 29, 2019

  1. Copy the full SHA
    b12bc84 View commit details
  2. Copy the full SHA
    7c48d35 View commit details
  3. chore(package): bump @types/jasmine@3.3.8, karma@4.0.0, prettier@1.16…

    ….1, pretty-quick@1.10.0, rollup@1.1.2, rollup-plugin-uglify@6.0.2, tslint@5.12.1, typescript@3.2.4, webpack@4.29.0
    christopherthielen committed Jan 29, 2019
    Copy the full SHA
    6f0e163 View commit details

Commits on Jun 3, 2019

  1. Copy the full SHA
    85e8b6b View commit details
  2. Copy the full SHA
    74f068e View commit details

Commits on Jun 14, 2019

  1. Copy the full SHA
    978b882 View commit details
  2. Copy the full SHA
    0cb263a View commit details
  3. Copy the full SHA
    dc0f58a View commit details
  4. Copy the full SHA
    74772bd View commit details

Commits on Sep 3, 2019

  1. fix(viewDirective): add check for componentProvider, avoid extra trig…

    …ger for $onInit (fixing #3735) (#3779)
    mlnkw authored and christopherthielen committed Sep 3, 2019
    Copy the full SHA
    c3e87ad View commit details
  2. Copy the full SHA
    3d8094a View commit details

Commits on Oct 2, 2019

  1. Copy the full SHA
    603ed7f View commit details
  2. Copy the full SHA
    00b1801 View commit details
  3. 1.0.23

    christopherthielen committed Oct 2, 2019
    Copy the full SHA
    f2c7d80 View commit details
Showing with 2,218 additions and 2,479 deletions.
  1. +14 −12 .travis.yml
  2. +32 −0 CHANGELOG.md
  3. +19 −20 package.json
  4. +1 −2 src/directives/stateDirectives.ts
  5. +1 −1 src/directives/viewDirective.ts
  6. +2 −2 src/interface.ts
  7. +4 −2 src/stateFilters.ts
  8. +2 −2 test/typescript2.2/package.json
  9. +22 −0 test/viewDirectiveSpec.ts
  10. +2,121 −2,438 yarn.lock
26 changes: 14 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
language: node_js
node_js: 8.9.1
services:
- xvfb
before_install:
- sh -e /etc/init.d/xvfb start
- export PATH=$HOME/.yarn/bin:$PATH
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.5.1
- sudo apt-get install libgconf-2-4
- export PATH=$HOME/.yarn/bin:$PATH
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.5.1
script:
- if [ "x${CORE_BRANCH}x" != "xx" ]; then npx publish_yalc_package .downstream_cache/core https://github.com/ui-router/core.git && yalc add @uirouter/core ; fi
- tsc &&
yarn test &&
yarn docs &&
yarn test:downstream
- if [ "x${CORE_BRANCH}x" != "xx" ]; then npx publish_yalc_package .downstream_cache/core https://github.com/ui-router/core.git && yalc add @uirouter/core ; fi
- tsc &&
yarn test &&
yarn docs &&
yarn test:downstream
env:
matrix:
- CORE_BRANCH=
- CORE_BRANCH=master UPSTREAM_PKGS=@uirouter/core
- CORE_BRANCH=
- CORE_BRANCH=master UPSTREAM_PKGS=@uirouter/core
notifications:
slack:
on_success: never
@@ -24,5 +26,5 @@ git:
depth: 3
cache:
directories:
- node_modules
- ".downstream_cache"
- node_modules
- '.downstream_cache'
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
## 1.0.23 (2019-10-02)
[Compare `@uirouter/angularjs` versions 1.0.22 and 1.0.23](https://github.com/angular-ui/ui-router/compare/1.0.22...1.0.23)

### Bug Fixes

* **stateFilters:** Export each function individually ([978b882](https://github.com/angular-ui/ui-router/commit/978b882))
* **travis:** Fix travis build ([dc0f58a](https://github.com/angular-ui/ui-router/commit/dc0f58a))
* **types:** Remove [@types/jquery](https://github.com/types/jquery) from devDependencies, upgrade [@types/angular](https://github.com/types/angular) ([b12bc84](https://github.com/angular-ui/ui-router/commit/b12bc84))
* **viewDirective:** add check for componentProvider, avoid extra trigger for $onInit (fixing [#3735](https://github.com/angular-ui/ui-router/issues/3735)) ([#3779](https://github.com/angular-ui/ui-router/issues/3779)) ([c3e87ad](https://github.com/angular-ui/ui-router/commit/c3e87ad))


---


### Updated `@uirouter/core` from 5.0.23 to 6.0.1
[Compare `@uirouter/core` versions 5.0.23 and 6.0.1](https://github.com/ui-router/core/compare/5.0.23...6.0.1)

### Bug Fixes

* **resolve:** remove unnecessary generics from CustomAsyncPolicy ([#452](https://github.com/ui-router/core/issues/452)) ([61f4ee9](https://github.com/ui-router/core/commit/61f4ee9))
* **travis:** use service: xvfb instead of launching it manually. install libgconf debian package ([ac1ef4b](https://github.com/ui-router/core/commit/ac1ef4b))


### Features

* **resolve:** Remove RXWAIT async policy in favour of allowing user defined async policy function ([#366](https://github.com/ui-router/core/issues/366)) ([0ad87f6](https://github.com/ui-router/core/commit/0ad87f6))


### BREAKING CHANGES

* **resolve:** RXWAIT async policy has been removed, but it never worked in the first place

## 1.0.22 (2019-01-29)
[Compare `@uirouter/angularjs` versions 1.0.21 and 1.0.22](https://github.com/angular-ui/ui-router/compare/1.0.21...1.0.22)

39 changes: 19 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@uirouter/angularjs",
"description": "State-based routing for AngularJS 1.x",
"version": "1.0.22",
"version": "1.0.23",
"scripts": {
"clean": "shx rm -rf lib lib-esm _doc build release *.log",
"compile": "tsc && tsc -m es6 --outDir lib-esm && npm run fixdts",
@@ -72,41 +72,40 @@
"module": "lib-esm/index.js",
"typings": "lib/index.d.ts",
"dependencies": {
"@uirouter/core": "5.0.23"
"@uirouter/core": "6.0.1"
},
"peerDependencies": {
"angular": ">=1.2.0"
},
"devDependencies": {
"@types/angular": "1.6.53",
"@types/angular": "1.6.54",
"@types/angular-animate": "^1.5.10",
"@types/angular-mocks": "^1.7.0",
"@types/jasmine": "^3.3.5",
"@types/jquery": "^3.3.29",
"@uirouter/publish-scripts": "^2.3.24",
"@types/jasmine": "^3.3.13",
"@uirouter/publish-scripts": "^2.3.27",
"dts-downlevel": "^0.3.0",
"fork-ts-checker-webpack-plugin": "^0.5.2",
"husky": "^1.3.1",
"jasmine-core": "^3.3.0",
"karma": "^3.1.4",
"fork-ts-checker-webpack-plugin": "^1.3.6",
"husky": "^2.4.1",
"jasmine-core": "^3.4.0",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.7",
"karma-super-dots-reporter": "^0.2.0",
"karma-webpack": "^3.0.5",
"karma-webpack": "^4.0.2",
"lodash": "^4.17.11",
"prettier": "^1.15.3",
"pretty-quick": "^1.8.0",
"rollup": "^1.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.0",
"rollup": "^1.15.3",
"rollup-plugin-node-resolve": "^5.0.2",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-uglify": "^6.0.0",
"ts-loader": "^5.3.3",
"tslint": "^5.12.0",
"rollup-plugin-uglify": "^6.0.2",
"ts-loader": "^6.0.2",
"tslint": "^5.17.0",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.2.2",
"webpack": "^4.28.1"
"typescript": "^3.5.2",
"webpack": "^4.34.0"
},
"husky": {
"hooks": {
3 changes: 1 addition & 2 deletions src/directives/stateDirectives.ts
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ import {
UIRouter,
} from '@uirouter/core';
import { UIViewData } from './viewDirective';
import EventHandler = JQuery.EventHandler;

/** @hidden Used for typedoc */
export interface ng1_directive {} // tslint:disable-line:class-name
@@ -124,7 +123,7 @@ function defaultOpts(el: IAugmentedJQuery, $state: StateService) {
}

/** @hidden */
function bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventHandler<any>, uiStateOpts: any): void {
function bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {
let events;

if (uiStateOpts) {
2 changes: 1 addition & 1 deletion src/directives/viewDirective.ts
Original file line number Diff line number Diff line change
@@ -465,7 +465,7 @@ function registerControllerCallbacks(
cfg: Ng1ViewConfig
) {
// Call $onInit() ASAP
if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {
if (isFunction(controllerInstance.$onInit) && !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {
controllerInstance.$onInit();
}

4 changes: 2 additions & 2 deletions src/interface.ts
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ export interface _Ng1StateDeclaration extends StateDeclaration {
* views: {
* $default: {
* template: '<h1>foo</h1>',
* controller: 'FooController
* controller: 'FooController'
* }
* }
* }
@@ -113,7 +113,7 @@ export interface _Ng1StateDeclaration extends StateDeclaration {
* var state = {
* name: 'foo',
* url: '/foo',
* controller: 'FooController, // invalid because views: exists
* controller: 'FooController', // invalid because views: exists
* views: {
* header: {
* template: '<h1>header</h1>'
6 changes: 4 additions & 2 deletions src/stateFilters.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ import { Obj, StateService, StateOrName } from '@uirouter/core';
* ```
*/
$IsStateFilter.$inject = ['$state'];
export function $IsStateFilter($state: StateService) {
function $IsStateFilter($state: StateService) {
const isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {
return $state.is(state, params, options);
};
@@ -33,7 +33,7 @@ export function $IsStateFilter($state: StateService) {
* ```
*/
$IncludedByStateFilter.$inject = ['$state'];
export function $IncludedByStateFilter($state: StateService) {
function $IncludedByStateFilter($state: StateService) {
const includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {
return $state.includes(state, params, options);
};
@@ -45,3 +45,5 @@ angular
.module('ui.router.state')
.filter('isState', $IsStateFilter)
.filter('includedByState', $IncludedByStateFilter);

export { $IsStateFilter, $IncludedByStateFilter };
4 changes: 2 additions & 2 deletions test/typescript2.2/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@types/angular": "1.5.14",
"@types/jquery": "2",
"@types/angular": "1.6.36",
"@types/jquery": "2.0.51",
"@uirouter/angularjs": "latest",
"typescript": "2.2"
},
22 changes: 22 additions & 0 deletions test/viewDirectiveSpec.ts
Original file line number Diff line number Diff line change
@@ -1334,6 +1334,28 @@ describe('angular 1.5+ style .component()', function() {
expect(log).toBe('onInit;');
});

it('should only call $onInit() once with componentProvider', function() {
$stateProvider.state('route2cmp', {
componentProvider: () => 'ngComponent',
resolve: {
data: function() {
return 'DATA!';
},
},
});

const $state = svcs.$state,
$httpBackend = svcs.$httpBackend,
$q = svcs.$q;

$httpBackend.expectGET('/comp_tpl.html').respond('-{{ $ctrl.data }}-');
$state.transitionTo('route2cmp');
$q.flush();
$httpBackend.flush();

expect(log).toBe('onInit;');
});

it('should supply resolve data to "<", "=", "@" bindings', function() {
$stateProvider.state('bindingtypes', {
component: 'bindingTypes',
Loading