标签:var index filter stc toms 基于 block doc http
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <div ng-app="myApp"> <div ng-controller="secondController"> </div> <div ng-controller="otherController"> </div> </div> <script type="text/javascript" src="../../vendor/angular/angularjs.js"></script> <script type="text/javascript" src="app/index.js"></script> </body> </html>
var myApp = angular.module(‘myApp‘,[],function () { }) //隐示依赖注入 .controller(‘firstController‘,function ($scope,CustomService) { }) //显示依赖注入(推荐) .controller(‘secondController‘,[‘$scope‘,‘$filter‘,function (a,b) { console.log(a); console.log(b(‘json‘)([1,2,3,4,5])); }]); function otherController(a) { console.log(a); } otherController.$inject = [‘$scope‘];
标签:var index filter stc toms 基于 block doc http
原文地址:http://www.cnblogs.com/bky-1083/p/6354565.html