0
아직 모호한 점이있어서 어리석은 질문을하는 경우 알려주세요! 감사.의존성 주입을 정리하는 방법은 무엇입니까?
난 내 레일 응용 프로그램에서 각도 모듈을 인스턴스 app.js 파일을 정돈하고 싶습니다. 그것은 현재이 목록은 관리하기가되도록,이
var app = angular.module('app', [
'ngRoute'
, 'ngAnimate'
, 'ngSanitize'
, 'ngCookies'
, 'http-auth-interceptor'
, 'angularFileUpload'
, 'underscore'
, 'angulartics'
, 'angulartics.google.analytics'
, 'angulartics.mixpanel'
, 'angular-loading-bar'
, 'mm.foundation'
, 'directives.dateInput'
, 'directives.elementResize'
, 'directives.calendar.calendarResize'
, 'directives.dayCalendar'
, 'directives.ngEnter'
, 'directives.datePicker'
// ....... and so on for filters
]);
같이 보입니다 자동으로 다른 지시를로드 지시하고 다른 필터를로드 필터를 필요로하는 것이 가능 거대한 목록입니다?
또한 컨트롤러/지시문에 주 서비스를 삽입 할 때 주 서비스가 자동으로 다른 서비스를 주입 할 수 있습니까? 예를 들어
:
app = angular.module("app")
app.service "ValidationService", (IdValidator) ->
return
app.service "IdValidator", ->
@validate = (value) ->
#insert code