component是1.5版本之后出现的组件的概念,directive是指令,Component相当于directive+controller+scope,component更适合基于组件的开发模式
两个页面传值要用后台服务器,你是指1.html和2.html这样的吗?这和angular没有关系,angular是用来实现html和js的绑定的 html: js:app.controller('控制器的名字',function($scope){ $scope.zs={ name:'张三', age:18 }; }) 这样$scope.zs.name变化会使input的value值改变,同时input的oninput事件触发时会通知$scope.zs.name改变