Friday, August 7, 2015

Angular Module

AngularJs is on the global scopeitself and module are saved to its variable you can access module 

Define anuglar Module

<script src="js/angular.min.js"></script> here i am adding angularjs file in our view script

 <div ng-app="angularModule"> here  ng-app is a directive to create a module angularModule is a module name

angular.module("angularModule",[]); here we are create a module.


HTML: file

<!DOCTYPE html>
<html>
    <head>
    <title>Angular Module</title>
        <script src="js/angular.min.js"></script>
    </head>
    <body>
        <div ng-app="angularModule">
            <p>AngularJs Module application form Muhammad Rehan Meo</p>
        </div>
    </body>    

</html>

Javascript: File

angular.module("angularModule",[]);

No comments:

Post a Comment

Swift Start Here