当我使用UI-农奴我的CSS是负载状态,JS角JS文件不加载他们给我错误的未捕获的SyntaxError:意外令牌LT; 在角JS 1,但在通常意味着没有ui-sref意味着使用状态他们加载我的html页面用css和所有文件使用state.go
我的代码是 模块 -
var Fishmart = angular.module('Fishmart', ['oc.lazyLoad', 'ui.router',
'ui.bootstrap', 'LocalStorageModule', 'slickCarousel']);
控制器 -
Fishmart.controller('productZoomController', ['$scope', 'ApiCall',
'$rootScope', '$state', '$stateParams', '$timeout', 'myStorageService', '
$ocLazyLoad',
function ($scope, ApiCall, $rootScope, $state, $stateParams, $timeout,
myStorageService, $ocLazyLoad) {
var Code = $stateParams.ID;
}]);
我的配置文件
Fishmart.config(['$ocLazyLoadProvider',
'localStorageServiceProvider','$stateProvider', '$urlRouterProvider',
'$locationProvider',
function ($ocLazyLoadProvider, localStorageServiceProvider, $stateProvider,
$urlRouterProvider, $locationProvider)
{
$urlRouterProvider.otherwise('/index');
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$stateProvider
.state('indexbody', {
url: '/index',
controller: 'indexBodyController',
templateUrl: 'angular_views/Index/indexbody.html',
resolve: {
loadMyFile: function ($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'Fishmart',
files: ['angular_scripts/controllers/indexBodyController.js']
})
}
}
}).state('menudetails', {
url: '/menudetails/:ID',
controller: 'productZoomController',
templateUrl: 'angular_views/ProductDetails/productzoom.html',
resolve: {
loadMyFile: function ($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'Fishmart',
files: ['angular_scripts/controllers/productZoomController.js'
, 'assets/css/xzoom.css'
, 'assets/js/xzoom.js']
})
}
}
});
HTML CODE
<a ui-sref="menudetails({ID:data.ProductCode})" href="#" class="btn btn-
outline-primary btn-lg"><span>Order now !</span></a>
请告诉我什么是错的