TypeError: Cannot read property 'name' of null at directive.link ([...]/angular-ui-router.js?v=0.1:894:77)
TypeError: Cannot read property 'name' of null at directive.link (http://localhost:3000/javascripts/lib/angular/angular-ui-router.js?v=0.1:894:77)
line:894: if (name.indexOf('@') < 0) name = name + '@' + (parent ? parent.state.name : '');
In the case where this error occurs, parent is set to:
{name: "@", state: null}

Can you post a Plunkr that replicates this? Have you created a build off of the master branch to verify that this issue still exists?
I am experiencing this issue as well:
https://github.com/beninfobelt/angular-practice
That's not a plunkr. :-)
sorry -- I just posted it here: http://plnkr.co/edit/YVasCW
my first time with plunkr - forgive me if I did it incorrectly
I don't think it's going to plunk properly because you're referencing scripts that aren't plunked (all that stuff in a bower_components directory).
EDIT: it also looks like you're double-referencing scripts, which may be problematic in any environment.
The goal of a plunker, in this case, is to isolate the problem in a small self-contained demonstration. See if you can cut way down on your app until you have a really small demonstration of the problem. And make sure all scripts are either loaded from an accessible source (e.g. the cdn) or in the plunker, which has no support for subdirectories.
Thnx for the plunkr hints.
I am worried mostly about the ui-router issue before trying to figure out how to upload projects to plunkr.
Is it possible to take a look at my git address? https://github.com/beninfobelt/angular-practice
You guys are doing some amazing work with ui-router and I really want to put to use what you've put together.
Its just that I'm being held back by this issue:
TypeError: Cannot read property 'name' of null at $ViewDirective.directive.link (http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js:894:77)
and I am fairly positive that it is a result of the get calls in my peopleCtrl:
$http({method: 'GET', url: 'http://search.ams.usda.gov/farmersmarkets/v1/data.svc/zipSearch?zip=60613', cache: $templateCache}).
success(function(data, status) {
$scope.domainStatus = status;
$scope.domainData = data;
}).
error(function(data, status) {
$scope.domainData = ['wrong', 'right'];
$scope.domainStatus = status;
});
I tried moving it to the dataFactory but had the same error.
Is it possible to take a look at my git address?
Nope, sorry. This is an Open Source project run by volunteers in our free time. Our goal with this issue tracker is to help the greatest number of people as quickly as possible. If we had to clone and set up a project for each person who had an issue, we'd never get anything done! :-) Thanks for your understanding, and thanks for being respectful of our time. Please let us know when you have a Plunkr set up that demonstrates the issue.
Sounds good guys - sorry for misunderstanding the protocal
I have taken your direction, sheared down the code and reposted: http://plnkr.co/edit/YVasCW?p=preview
In the process, the ~ TypeError: Cannot read property 'name' of null ~ issue has been eliminated (I think bc of Stu's suggestion to remove double-referencing scripts)
However, it is still not able to make the get call and displaying a Failed to load resource error.
I would be very grateful for any related insight you can provide.
Many thnx for your help with this as I become versed in the proper use of angularjs
Looking at this, it seems unrelated to ui-router. I see the error, but not sure how a failed http.get is related to ui-router. Maybe your original error was more pertinent, but you've fixed that one.
You were missing:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular-resource.min.js"></script>
Other than that, it seems to work fine for me, except for a failed OPTIONS request to http://search.ams.usda.gov/farmersmarkets/v1/data.svc/zipSearch?zip=60613.
Thanx Nate - it turned out the issue was related to incorrect syntax as well as a requisite to upgrade to the latest version of resource and angular itself
var dataService = $resource('http://search.ams.usda.gov/farmersmarkets/v1/data.svc/zipSearch?zip=:zip', {callback: 'JSON_CALLBACK'}, {get: {method: 'JSONP'}});
$scope.domainData = dataService.get({zip: 60613});
Thank you greatly for guiding me through the problem and for showing me the value/protocol of Plunker
http://plnkr.co/edit/9orfih?p=preview
Alright, good deal. I assume that means we can close this?
yes - good to close - many thnx