我在使用新应用程序设置Angular UI表单时遇到错误。
这是代码;
的index.html
<!-- build:js({app,.tmp}) scripts/vendor.js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/angular-ui-form-validation/dist/angular-ui-form-validation.js"></script>
<!-- endbuild -->
<!-- build:js({app,.tmp}) scripts/main.js -->
<script src="scripts/app.js"></script>
Bower.Json
{
"name": "easijob",
"version": "0.0.0",
"dependencies": {
"modernizr": "2.8.x",
"angular": "1.2.24",
"angular-resource": "1.2.x",
"angular-ui-router": "0.2.x",
"jquery": "2.1.1",
"angular-ui-form-validation": "~1.1.15"
},
"resolutions": {
"angular": "1.2.24",
"jquery": "2.1.1"
}
}
app.js
'use strict';
angular.module('easijob', ['directives.customvalidation.customValidationsTypes',
'ngResource',
'ui.router',
'ENV'])
// Routing for the app.
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
abstract: true,
views: {
'header': {
templateUrl: 'partials/layout/sections/header.html',
controller: function($scope, $state) {
$scope.$state = $state;
}
},
'footer': {
templateUrl: 'partials/layout/sections/footer.html'
}
}
})
;
$urlRouterProvider.otherwise('/signup/candidate');
})
// On State Change, redefine layout type class based on route.
.run(function($rootScope) {
$rootScope.$on('$stateChangeSuccess',function(event, toState, toParams, fromState, fromParams){
$rootScope.layoutVariant = toState.layoutType || 'one-column';
});
})
;
有什么想法吗?
乙
答案 0 :(得分:0)
它是'directives.customvalidation.customValidationTypes'而不是''directives.customvalidation.customValidation ** s ** Types'。
所以:
angular.module('easijob', ['directives.customvalidation.customValidationTypes',
'ngResource',
'ui.router',
'ENV'])