A
A
Anatoliy Mikhailov2014-09-25 16:27:30
JavaScript
Anatoliy Mikhailov, 2014-09-25 16:27:30

How in angular-js to react to the event of the first rendering of the view with the ng-Route module?


The project uses the semantic-ui library and for some of its elements it is necessary to run initialization like $('. ui.dropdown ').dropdown() .ui.dropdown').dropdown()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2014-09-25
@yamaoto

Such things are done in directives.
Give each .ui.dropdown a directive.

directive('mydd', function() {
    return {
        restrict: 'A',
        link: function(scope, elem) {
            elem.dropdown();
        }
    };
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question