angular路由 模块 依赖注入

1.模块

var helloModule=angular.module('helloAngular',[]);
helloModule.controller('helloNgCrtl',['$scope',function($scope){
    
}]);


完整的项目结构


 

2.路由

controller利用模板来生成视图

3.依赖注入

var bookStoreApp=angular.module('bookStoreApp',['ngRoute','bookStoreCtrls',....])

ng开头的是angular自身提供的模块,

 

posted on 2016-11-15 14:48  rigidwang  阅读(374)  评论(0编辑  收藏  举报