我正在使用angularJS加载表单并有2个问题
请查看附加代码:
.state('index.categdashboard', {
url: "/categdashboard",
templateUrl: "views/categdashboard.html",
data: { pageTitle: 'Category wise Headcount - Dashboard' },
controller: 'getCategoryWiseSummary',
resolve: {
loadPlugin: function ($ocLazyLoad) {
return $ocLazyLoad.load([
{
files: [
// Row 1
'js/categdashboard/categdashboard.js',
],
cache: false
}
]);
}
}
})

我试过了
$(document).ready(function () {

但它也没有用
答案 0 :(得分:0)
我在新视图中声明了一个新控制器并从中调用了JavaScript函数。
angular
.controller('MainDashboardCtrl', MainDashboardCtrl)
function MainDashboardCtrl(){
// Called functions here
}
<div ng-controller="MainDashboardCtrl as MDCtrl">
</div>