AngularJS is Mainly Divided into Three Parts Controllers , Directives , Services .
AngularJS Controls the data of the component for which it is defined . It is mainly initiated by $scope object which is update after any event is fired in the dom . It contains information of models and its data . Lets take an example of $scope in controller
<input ng-model="Name" placeholder="Name" />
In JS you can access this ng-model Name any time you want
AngularJS lets you extend HTML with new attributes called Directives. It has a set of built-in directives which offers functionality to your applications and also lets you define your own directives. It Gives your HTML Tag new power . You can change , Append , Remove DOM through this directive . It makes your application fully responsive. Many inbuilt Directives are
ng-model = To Bind your input to the modal
ng-init = It is used to initiate modals with specific values
ng-app = It is used to initiate application
ng-repeat= It is used iterate over an array and repeat all html tags coming inside it
and many more every directives have different functionalities .You can also create your own custom diretives
In AngularJS, a service is a function, or object, that is available for, and limited to, your AngularJS application. AngularJS has about 30 built-in services. For many services, like the
$location service, it seems like you could use objects that are already in the DOM, like the
window.location object, and you could, but it would have some limitations, at least for your AngularJS application. AngularJS constantly supervises your application, and for it to handle changes and events properly, AngularJS prefers that you use the
$location service instead of the
window.location object. Inbuilt Services contains $http ,$timout etc
You Can also Create your own custom service to complete your needs . You can create different filter services for your application . Which services can be used to filter your output .
To learn more about AngularJS you can prefer there official website
We Will be completing task of your student details system . You can find task here .
- Visual Studio Code . you can find help here .
- PHP Api for consuming You can find here how to develop PHP api .
- Basic knowledge of angularJS . from here.
- W3.css for beautification of HTML Copy this link in headers (<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">)
- AngularJS CDN copy this link in the end of body (<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>)
We need to write two files in for making angular Application
- HTML file (here we will write our template )
- App.js here we will write application logic in details by using Angular JS Framework