angular中关于文件引入
var angular = require('angular'); module.exports = angular.module('app.mymodule2', []).controller('HWController', ['$scope', function ($scope) { $scope.message = "This is HWController"; }]).name;
var angular=require('angular'); module.exports = angular.module('app.mymodule1', []).directive('helloWorld', function () { return { restrict: 'EA', replace: true, scope: { message: "@" }, template: '<div><h1>Message is {{message}}.</h1><ng-transclude></ng-transclude></div>', transclude: true } }).name;
var angular = require('angular'); var d = require('./helloworld.directive'); var c = require('./helloworld.controller'); module.exports = angular.module('app.mymodule', [d, c]).name;
其实我想叫洛羽的,谁抢了我的昵称!!