JS: Failed to execute 'getComputedStyle' on 'Window': parameter is not of type 'Element'

前端 未结 6 1806
北海茫月
北海茫月 2020-12-09 14:56

In short: I am trying to understand the meaning of this TypeError: Failed to execute \'getComputedStyle\' on \'Window\': parameter 1 is not of type \'Element\' The error app

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 15:39

    For those who got this error in AngularJS and not jQuery:

    I got it in AngularJS v1.5.8 by trying to ng-include a type="text/ng-template" that didn't exist.

     
    ...

    Make sure that when you use ng-include, the data for that directive points to an actual page/section. Otherwise, you probably wanted:

    {{tab.content}}

提交回复
热议问题