0

I'm just looking to try AngularJS as it looks very promising.

I am using fancybox to load my pages in my current application like so:

$.fancybox({
    'href' : 'pages/example.php',
    'type' : 'ajax',
    'fitToView' : true
});

I am using the exact code from example 4 here for the Instant Search.

I know the controller is not being executed but I am not sure as to the reason.

UPDATE: I now see that if I load the AngularJS script at the end of the body it works. Is there a command to do the same thing i.e. re-init?

4

1 回答 1

0

尝试这个

jQuery(function($){
  $.fancybox({
    'href' : 'pages/example.php',
    'type' : 'ajax',
    'fitToView' : true
  });
});

并确保您已按特定顺序初始化 jQuery 和 fancybox。还要检查您是否收到任何可能使您的脚本无效的 js 错误

于 2013-09-03T04:27:06.983 回答