我抛出了这个错误:
---
name: expand
url: /:id
---
<div ng-controller="MainCtrl">
<p>This is the expanded view for each of the businesses</p>
</div>
当我尝试在angularjs中使用$ window.open / window.open时。
Generate.html
void allocate( int ***mat, int n, int m )
{
int i;
*mat = (int **) malloc( n * sizeof( int* ) );
for ( i = 0; i < n; i++ )
{
( *mat )[i] = ( int *) malloc ( m * sizeof( int ) );
}
#if DEBUG
printf ("allocate n: %d m: %d\n",n,m);
#endif // DEBUG
}
Generate.ctrl.js
Error: Error: [$parse:isecwindow] Referencing the Window in Angular expressions is disallowed!
这是我使用过的代码。我需要做什么才能避免每次使用$ window.open时抛出此错误?
答案 0 :(得分:4)
您正在从视图中运行$ window.open()。这样做:(不要使用返回)
function downloadFile ( fileType ) {
var path = '/images/reports/DistrictSchoolReport.' + fileType;
$window.open( path );
}