I've a very simple app with no code in it yet. I've removed it to check for this error that I am getting - "angular.js:13708 Error: [ng:areq] Argument 'ClientFileConfigController' is not a function, got undefined"
I've followed the similar patter in my angularjs app (1.5.3) and it works fine. This code is using angularjs (1.5.7) and the only difference is I used bower to individually chose my packages, rather than using nuget.
I am unable to decode this error :-(
app.js
(function () {
var app = angular.module('ConfigApp', ['ngRoute', 'ngAnimate', 'TreeWidget']);
app.config(['$routeProvider', function ($routeProvider) {
var viewBase = '/app/ConfigApp/views/';
$routeProvider
.when('/clients', {
controller: 'ClientFileConfigController',
templateUrl: viewBase + 'clients.html',
controllerAs: 'vm'
})
//.when('/clients/:clientId/:fileId', {
// controller: 'clientfileEditController',
// templateUrl: viewBase + 'edit.html',
// controllerAs: 'vm'
//})
.otherwise({ redirectTo: '/clients' });
}]);
}());
clientfileConfigController.js
(function(){
var injectParams = ['$scope'];
var ClientFileConfigController = function ($scope) {
}
ClientFileConfigController.$inject = injectParams;
angular.module('ConfigApp').controller('ClientFileConfigController', ClientFileConfigController)
}());
index.html
<html ng-app="ConfigApp">
<head>
<title>Client File Angular Tree Widget</title>
<meta charset="utf-8" />
</head>
<body ng-cloak>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#/clients">Clients</a></li>
</ul>
</div>
</div>
</nav>
.top-buffer { margin-top:20px; }
<div class="slide-animation-container">
<div ng-view id="ng-view" class="slide-animation"></div>
</div>
</body>
</html>
clients.html
<html>
<head>
<title></title>
<meta charset="utf-8" />
</head>
<body>
<h1>Hello World</h1>
<!--<tree nodes='treeNodes'>-->
</body>
</html>