zoukankan      html  css  js  c++  java
  • 如何在AngularJS渲染后再加载JS

    http://www.itnose.net/detail/6100484.html

    app.directive('repeatDone', function () {
        return function (scope, element, attrs) {
            var input = element.find('.calendar .calendarInput');
            input.datepicker({ changeMonth: true, changeYear: true, maxDate:0});
            element.find('.calendar .calendarButton').click(function () {
                input.trigger("focus");
            });
            if (scope.$last) { // all are rendered
                scope.$eval(attrs.repeatDone);
            }
        }
    });
    
    
    app.directive('onFinishRenderFilters', function ($timeout) {
        return {
            restrict: 'A',
            link: function (scope, element, attr) {
                if (scope.$last === true) {
                    $timeout(function () {
                        scope.$emit('ngRepeatFinished');
                    });
                }
            }
        };
    });
  • 相关阅读:
    Python Day7(相关补充)
    Python Day7
    Python Day6
    Python Day5
    Python Day4
    Python Day3
    Python Day2
    Python Day1
    复杂装饰器原理分析
    Unity 坐标
  • 原文地址:https://www.cnblogs.com/zcynine/p/5148104.html
Copyright © 2011-2022 走看看