2016-02-06 99 views
0
(function() { 

    'use strict'; 

    angular.module 
('newApp', [ 'ngAnimate', 
    'ngCookies', 
    'ngAria', 
    'ngCookies', 
    'ngMessages' 
    ]) 

    .config(function ($routeProvider) { 
     $routeProvider 
     .when('/', { 
      templateUrl: 'views/main.html', 
      controller: 'MainCtrl', 
      controllerAs: 'main' 
     }) 
     .otherwise({ 
      redirectTo: '/' 
     }); 
    }); 
})(); 

我想安裝使用命令「鮑爾安裝」鮑爾。 它沒有提供,甚至沒有錯誤即將到來。鮑爾安裝不生成我的項目庫

+0

您添加角庫? –

+0

是的,它被添加。 – user3152849

+0

發佈你的完整代碼和HTML視圖 – Sajeetharan

回答

0

嘗試通過全球angularIIFE如果你加入HTML角由script標籤

(function (angular) { 

    'use strict'; 

    angular.module 
('newApp', [ 'ngAnimate', 
    'ngCookies', 
    'ngAria', 
    'ngCookies', 
    'ngMessages' 
    ]) 

    .config(function ($routeProvider) { 
     $routeProvider 
     .when('/', { 
      templateUrl: 'views/main.html', 
      controller: 'MainCtrl', 
      controllerAs: 'main' 
     }) 
     .otherwise({ 
      redirectTo: '/' 
     }); 
    }); 
})(angular); 
+0

其實我試圖使用這個命令「bower install」來安裝bower,它不會在我的項目中生成角度庫,即使沒有錯誤發生。 – user3152849