kontrolör Açısal yeni bir yönlendirici örneğini ve bir bileşen için basit bir kontrolör yaparken bana bir hata atar alınamadı: Ben $ rootScope enjekte etmeden denedimBen 1.4 için yeni Açısal yönlendirici kullanıyorum
angular.module('app.campaigns',['security', 'ngNewRouter'])
.controller('CampaignsController', ['authService', '$rootScope', CampaignsController]);
function CampaignsController (authService, $rootScope) {
console.log ('this is campaigns controller');
this.currentUser = $rootScope.authService.currentUser;
this.authService = $rootScope.authService;
this.logout = authService.logout;
}
ve aynı. Neyi yanlış yapıyorum? Çok benzer bir bileşen cazibe gibi çalışır, ancak bu olmaz.
app.js söz konusu hatayı dahil edebilir? –