In my controller:
.controller('ContactCtrl', function($scope, $stateParams, lodash) {
$scope.selectedContact = lodash.findWhere($scope.businesscards, { Id: parseInt($stateParams.contactId) });
console.log($scope.selectedContact);
});
In my View:
<div class="item">
{{ $scope.selectedContact }}
<h2>{{ $scope.selectedContact.Full_Name }}</h2>
<p>{{ $scope.selectedContact.Company | uppercase }}</p>
</div>
Why I cannot access $scope.selectedContact and even $stateParams.contactId in my view?
$scopeis implicit in expressions{{ }}and should not be provided. try{{selectedContact}}.