         validateAll: -> validation.validateAll(values)
         watchField: events.watchField
         submit: submit
+      if form.dependencies? then registerDependencies(form.dependencies)
+      setFields(form.pages)
       return services
   )

        for d in deps
          f = angular.injector([d.module]).get(d.factory)          
          if d.type == "validator" then validation.add(d.name, f)
            

      if form.dependencies? then registerDependencies(form.dependencies)
      setFields(form.pages)

      services =
        display: display

            line.fields.map (f) -> validation.initValidation(f, services)
          p += 1

      changeValue = (fieldName, value) ->
        values[fieldName] = value
        validation.removeError(fieldName)
        events.handle(fieldName, "change", value)
