Encountering an issue while trying to access attributes from the child controller
> Unknown provider: attrsProvider <- attrs
Below is the code snippet:
var app = angular.module('plunker', []);
//parent controller
app.controller('MainCtrl', function($scope, $controller, $attrs ) {
//extending child controlller
angular.extend(this, $controller('MainCtrl2', {$scope: $scope}));
});
//child controller
app.controller('MainCtrl2', function($scope, $controller, $attrs) {
console.log($attrs)
});
However, accessing attributes from the parent controller works without any issues...