Showing posts with label Angular JS. Show all posts
Showing posts with label Angular JS. Show all posts

Wednesday, July 20, 2016

AngularJS History

Angular JS

AngularJS was originally developed in 2009 by Miško Hevery at Brat Tech LLC
Angular as an open-source library.


First Releases:
stable release of AngularJS is 1.5.7

Finale Releases:
Angular 2 moved to Beta in December 2015

First release candidate was published in May 2016
Support 

Versions 1.2 and later of AngularJS do not support Internet Explorer versions 6 or 7


Anjular JS library

Anjular JS library


  • -its collection of function
  • its used for web apps
  • chargable for code 
  • call to our code as library

Angular JS & HTML

Angular JS & HTML
  • - designed for application
  • -its is declarative language
  • -html  working for static documents
  • -Does not contain to create way of creating application ,helps buliding the web apllication

Angular JS


  • -structural farmaework for dynamic apps
  • -used in HTML
  • -databinding  and dependency injection
  • -designed for application and injection
  • -any action happen with the browser

Tuesday, February 16, 2016

Menu bar in Angualr JS

We are using Angular’s directives to set and read the active variable

<style>
*{
margin:0;
padding:0;
}

body{
font:15px/1.3 'Open Sans', sans-serif;
color: #5e5b64;
text-align:center;
}

a, a:visited {
outline:none;
color:#389dc1;
}

a:hover{
text-decoration:none;
}

section, footer, header, aside, nav{
display: block;
}

/*-------------------------
The menu
--------------------------*/

nav{
display:inline-block;
margin:60px auto 45px;
background-color:#5597b4;
box-shadow:0 1px 1px #ccc;
border-radius:2px;
}

nav a{
display:inline-block;
padding: 18px 30px;
color:#fff !important;
font-weight:bold;
font-size:16px;
text-decoration:none !important;
line-height:1;
text-transform: uppercase;
background-color:transparent;

-webkit-transition:background-color 0.25s;
-moz-transition:background-color 0.25s;
transition:background-color 0.25s;
}

nav a:first-child{
border-radius:2px 0 0 2px;
}

nav a:last-child{
border-radius:0 2px 2px 0;
}

nav.home .home,
nav.projects .projects,
nav.services .services,
nav.contact .contact{
background-color:#e35885;
}

p{
font-size:22px;
font-weight:bold;
color:#7d9098;
}

p b{
color:#ffffff;
display:inline-block;
padding:5px 10px;
background-color:#c4d7e0;
border-radius:2px;
text-transform:uppercase;
font-size:18px;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

HTML

 It replaces it with the contents of the variable.

<div id="main" ng-app>


<nav class="{{active}}" ng-click="$event.preventDefault()">



<a href="#" class="home" ng-click="active='home'">Home</a>
<a href="#" class="projects" ng-click="active='Hardware'">Hardware</a>
<a href="#" class="services" ng-click="active='Software'">Software</a>
<a href="#" class="contact" ng-click="active='contact'">Contact</a>
</nav>



<p ng-hide="active">Please click a menu item</p>
<p ng-show="active">You chose <b>{{active}}</b></p>
</div>

Tuesday, January 19, 2016

how to passing data between two variable scopes in Angular JS

<div ng-app>
  <input type="text" ng-model="name">
   <div ng-repeat="i in [1]">
       <input type="text" ng-model="name"><br/>
        First scope:{{name}}
   </div>
   Second scope:{{name}}
</div>

function TodoCtrl($scope) {

}

Monday, October 26, 2015

Difference between Jquery and Angular js ?

jQuery:


  • jQuery is Library
  • JQuery sometimes is a very slow to manipulate the DOM
  • Also an slow way to manipulate the DOM, affecting in this way the user experience.
  • the jqlite and pure javascript to manipulate the DOM and follow the best practices to create  directives.
  • jQuery is a JavaScript library that handles ways to manipulate your HTML. 
  • It ensures that your code will be compatible as this library is maintained by a huge group of experts.
  • JQuery is definitely something that front-end developers should know well before even touching Angular, 
  •  jQuery is less prone to that.
  •  I do MVC and jQuery is a part of the view, but the Model and Controller are made in server-side technologies

Angular JS

  • AngularJS is a FRAMEWORK 
  • to create a complex web app for which you need a massive amount of Javascript and keep it organized, flexible and manageable? Use AngularJS. In fact, AngularJS has jQuery built-in (jqLite).
  • Angular is an JavaScript structural framework that has a lot of the effects similar to jquery, but is a more designed to create one-page web applications. 
  • It is also open source and compatible. Angular often plays along with other technologies for quick efficient development or larger web applications.
  • Angular will often seem like an extremely opinionated and hard to grasp beast. Angular is a framework, and like with every framework out there, you need to understand the language(s) it employs. I say learn to walk before you run, and don't become a snob who wants to do everything in Angular just because it sounds cool. 
  • Angular is going through pretty significant changes and its versions tend to break things.
  • AngularJS would be an overkill to make another MVC over the View layer whereas the Controller and Model are server-side
  • Mobile apps and MVC but have no server-side technologies behind, so the MVC structure implemented in AngularJS.


Common Comments

If you are learning front-end development, concentrate in jQuery for now.