Closed willsoto closed 7 years ago
Currently fails with the following error:
TypeError: test.js: Cannot read property '$chained' of undefined
You should be able to reproduce this with the following code (test.js):
test.js
import angular from 'angular'; import ngRoute from 'angular-route'; export default angular.module('app', [ ngRoute ]) .config(function($routeProvider) { 'ngInject'; $routeProvider .when('/some/url', { templateUrl: './template.html', controller: 'ViewController', controllerAs: 'view', resolve: { payload($route, $location) { 'ngInject'; return true; } } }); });
Create the following babelrc:
{ "presets": [ [ "env", { "targets": { "chrome": 52 } } ] ], "plugins": [ "angularjs-annotate" ] }
and the following command:
./node_modules/.bin/babel test.js
Versions:
Node: 7.0.0 NPM: 4.0.1 Babel: 6.18.0 (babel-core 6.18.2)
7.0.0
4.0.1
6.18.0 (babel-core 6.18.2)
When you remove payload() {} from the resolve object, the code successfully transpiles.
payload() {}
resolve
Fixed this in 0.7.0. Let me know if it works for you!
Currently fails with the following error:
TypeError: test.js: Cannot read property '$chained' of undefined
You should be able to reproduce this with the following code (
test.js
):Create the following babelrc:
and the following command:
./node_modules/.bin/babel test.js
Versions:
Node:
7.0.0
NPM:4.0.1
Babel:6.18.0 (babel-core 6.18.2)
When you remove
payload() {}
from theresolve
object, the code successfully transpiles.