1
從文檔和其他示例看來,我確實使用了這個。但是,在Chrome控制檯中,我收到錯誤: $ anchorScroll未定義。
觸發此功能的點擊函數在下面的代碼中稱爲viewBugForm()。
feedbackModule.controller('feedbackController', ['$scope', '$timeout','$location','commonService',
function ($scope, $timeout, $location, commonService) {
scroll =() => {
$timeout(() => {
$location.hash('bug-form');
$anchorScroll();
});
}
$scope.viewBugForm = (type) =>
{
scroll();
}
這裏是主播:
<a id="bug-form"></a>
坦白說,我無法找到任何錯誤。我試過了,沒有超時。
任何想法?
感謝