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: 0.3.2
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: 0.4.0
Choose a head ref
  • 17 commits
  • 20 files changed
  • 4 contributors

Commits on Nov 30, 2016

  1. Copy the full SHA
    67e4997 View commit details

Commits on Dec 9, 2016

  1. use $templateRequest from AngularJS

    - modified `$templateFactory` to use `$templateRequest` provider of
    AngularJs in case it is avalable
    - removed the test case which enforces the setting of request header
    `Accept: text/html`
    anantanandgupta authored and christopherthielen committed Dec 9, 2016
    Copy the full SHA
    9a1af98 View commit details
  2. error fixed

    - AngularJS 1.0.8 don't have $injector.has
    anantanandgupta authored and christopherthielen committed Dec 9, 2016
    Copy the full SHA
    c4ab9ba View commit details
  3. chore(1.3 tests): Update the Angular version

    Replace 1.3.0 with 1.3.17.
    rjamet authored and christopherthielen committed Dec 9, 2016
    1
    Copy the full SHA
    9895f94 View commit details
  4. test(templateFactory): Verifiy the security checks and compatibility …

    …on 1.3+
    
    templateFactory uses templateRequest, which calls the $sce to run
    the usual security checks on template URLs. This change verifies
    that the policy is indeed enforced, and that the user can provide
    $sce-trusted types through templateFactory (i.e., no assumptions
    are made that URLs are plain strings).
    rjamet authored and christopherthielen committed Dec 9, 2016
    Copy the full SHA
    8b87fec View commit details
  5. Copy the full SHA
    ad1f093 View commit details

Commits on Dec 15, 2016

  1. feat($templateFactory): refactor to a Provider to have a $http/$templ…

    …ateRequest switch
    
    This creates a $TemplateFactoryProvider to be able to set a global config option
    that forces $templateFactory to use $http (which bypasses the security checks,
    hence the scary name). Added tests and doc for that too. This still defaults to
    $http on older Angulars as expected.
    rjamet authored and christopherthielen committed Dec 15, 2016
    Copy the full SHA
    7f1dec0 View commit details
  2. Copy the full SHA
    d7fae8e View commit details
  3. fix(uiView): do not leave initial view scope undestroyed (fix unhandl…

    …ed rejection)
    
    This is a backport of #3164 from `master` to `legacy`
    
    Previously the contents of the initial view were linked and left
    undestroyed when the view was replaced with a subview. Because the view
    was not destroyed, directives like ngInclude assumed it was safe to
    compile and link asynchronous content to it. This would cause a ctreq
    error if the asynchronous content required another directive from the
    DOM. Now the initial view is either not linked at all or its scope is
    properly destroyed.
    
    Closes #3164
    jpekkala authored and christopherthielen committed Dec 15, 2016
    Copy the full SHA
    5be98e0 View commit details
  4. Copy the full SHA
    ba077aa View commit details

Commits on Jan 3, 2017

  1. fix(urlMatcherFactory): Check for null in int.is()

    Fixes message: Cannot read property 'toString' of null
    Closes #3197
    christopherthielen committed Jan 3, 2017
    Copy the full SHA
    61728d7 View commit details
  2. Copy the full SHA
    cc62abe View commit details

Commits on Jan 18, 2017

  1. fix($state): Fix "Possibly unhandled rejection" by catch()ing the tra…

    …nsition promise
    
    Now calling `.catch()` on the transition promise
    
    Closes #3246
    Closes #2889
    christopherthielen committed Jan 18, 2017
    2
    Copy the full SHA
    f2910e9 View commit details
  2. chore(*): bump package version to 0.4.0

    chore(*): Add npm prepublish to enable "npm install ../angular-ui-router"
    christopherthielen committed Jan 18, 2017
    Copy the full SHA
    d0f4937 View commit details
  3. Copy the full SHA
    589c09e View commit details
  4. Copy the full SHA
    2f81a0b View commit details

Commits on Jan 19, 2017

  1. release 0.4.0

    christopherthielen committed Jan 19, 2017
    Copy the full SHA
    25614ee View commit details
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ node_modules
bower_components
.DS_Store
*~
.*

# webstorm files
.idea
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Any hidden files
**/.*

# Jetbrains files
*.ipr
*.iws
*.iml

# Build related stuff
/build
/config
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
<a name="0.4.0"></a>
## 0.4.0 (2017-01-17)


#### Bug Fixes

* **$state:** Fix "Possibly unhandled rejection" by catch()ing the transition promise ([f2910e9b](https://github.com/angular-ui/ui-router/commit/f2910e9b00ebcf652abab2af8a405b5b5fbca054), closes [#3246](https://github.com/angular-ui/ui-router/issues/3246), [#2889](https://github.com/angular-ui/ui-router/issues/2889))
* **ui-sref-active-eq:** Compare parameter values using typed parameters ([67e4997e](https://github.com/angular-ui/ui-router/commit/67e4997eadfc1f7f5af8efd7cb676218cc69129e))
* **uiView:** do not leave initial view scope undestroyed (fix unhandled rejection) ([5be98e04](https://github.com/angular-ui/ui-router/commit/5be98e047a096012762096922a2756a0a0a0ea60), closes [#3164](https://github.com/angular-ui/ui-router/issues/3164))
* **urlMatcherFactory:** Check for null in int.is() Fixes message: Cannot read property 'toString' of nul ([61728d71](https://github.com/angular-ui/ui-router/commit/61728d717ab4f7b03a017c4666ab1a5a1ffe4620), closes [#3197](https://github.com/angular-ui/ui-router/issues/3197))

#### Features

* **$templateFactory:** use $templateRequest from AngularJS ([9a1af98](https://github.com/angular-ui/ui-router/commit/9a1af98)), closes [#]
* **$templateFactory:** refactor to a Provider to have a $http/$templateRequest switch ([7f1dec00](https://github.com/angular-ui/ui-router/commit/7f1dec008e98ae206c53d67268c330846c4d227d))

# BREAKING CHANGE: Use angular 1.3+ `$templateRequest` service to fetch templates

We now fetch templates using `$templateRequest` when it is available (angular 1.3+).
You can revert to previous template fetching behavior using `$http` by configuring the ui-router `$templateFactoryProvider`.

```js
.config(function($templateFactoryProvider) {
$templateFactoryProvider.shouldUnsafelyUseHttp(true);
});
```

There are security ramifications to using `$http` to fetch templates.
Read
[Impact on loading templates](https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates)
for more details.


<a name="0.3.2"></a>
## [0.3.2](https://github.com/angular-ui/ui-router/compare/0.3.1...0.3.2) (2016-11-03)

10 changes: 5 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ module.exports = function (grunt) {
ng108: { configFile: 'config/karma-1.0.8.js' },
ng115: { configFile: 'config/karma-1.1.5.js' },
ng1214: { configFile: 'config/karma-1.2.14.js' },
ng130: { configFile: 'config/karma-1.3.0.js' },
ng1317: { configFile: 'config/karma-1.3.17.js' },
ng149: { configFile: 'config/karma-1.4.9.js' },
ng150: { configFile: 'config/karma-1.5.0.js' },
background: {
@@ -125,7 +125,7 @@ module.exports = function (grunt) {
}
});

grunt.registerTask('integrate', ['build', 'jshint', 'karma:ng108', 'karma:ng115', 'karma:ng1214', 'karma:ng130', 'karma:ng149', 'karma:ng150']);
grunt.registerTask('integrate', ['build', 'jshint', 'karma:ng108', 'karma:ng115', 'karma:ng1214', 'karma:ng1317', 'karma:ng149', 'karma:ng150']);
grunt.registerTask('default', ['build', 'jshint', 'karma:unit']);
grunt.registerTask('build', 'Perform a normal build', ['concat', 'uglify']);
grunt.registerTask('dist', 'Perform a clean build', ['clean', 'build']);
@@ -137,9 +137,9 @@ module.exports = function (grunt) {
grunt.registerTask('widedocs', 'Convert to bootstrap container-fluid', function () {
promising(this,
system(
'sed -i.bak ' +
'-e \'s/class="row"/class="row-fluid"/\' ' +
'-e \'s/icon-cog"><\\/i>/icon-cog"><\\/i>Provider/\' ' +
'sed -i.bak ' +
'-e \'s/class="row"/class="row-fluid"/\' ' +
'-e \'s/icon-cog"><\\/i>/icon-cog"><\\/i>Provider/\' ' +
'-e \'s/role="main" class="container"/role="main" class="container-fluid"/\' site/index.html')
);
});
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ui-router",
"version": "0.3.2",
"version": "0.4.0",
"license" : "MIT",
"main": "./release/angular-ui-router.js",
"dependencies": {
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ui-router",
"version": "0.3.2",
"version": "0.4.0",
"description": "State-based routing for AngularJS",
"keywords": [
"angular",
2 changes: 1 addition & 1 deletion config/karma-1.3.0.js → config/karma-1.3.17.js
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ module.exports = function (karma) {
basePath: '..',

// list of files / patterns to load in the browser
files: [].concat(files.angular('1.3.0'), files.testUtils, files.src, files.test),
files: [].concat(files.angular('1.3.17'), files.testUtils, files.src, files.test),

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
Loading