Головна‎ > ‎Додатково‎ > ‎Angular‎ > ‎

Directive

<div ng-app="myApp" my-directive></div>

<script> 
var app = angular.module("myApp", []);

app.directive("myDirective"function() {
    return {
        template : "I was made in a directive constructor!"
    };
});
</script>




ng-app, ng-bind, ng-init... - директиви