Become a ninja with Angular [PART 1]
Hi everyone my name is Raihan.
Today I'm gonna share you about become a ninja with angular part 1
Maybe you just heard angular, or maybe some of you have used angular or maybe some of you have been pro using angular Okay, then this article will be flashback for you than have used pro/angular or this article could be something new for those people that just heard about angular.
So what is angular? and why angular?
simply, angular is modern framework of javascript that runs with technology strict syntactical superset of JavaScript also known as typescript which with typescript you app could be large scale even more, more about typescript can catch more here.
Reason angular, because angular is open source, free, easy to learn, easy to maintain, develop and there are cool features in angular such as animation, touch event, templates, security and much more. If you have'nt seen list of coolest features in angular, here the guide of angular 1.x
Okay let's get started
Angular has the latest version called Angular 6 before we jump to latest version, it would be more fun if we started from Angular 1 so we can understand flow/architecture of the angular itself.
In Angular 1.x
we can simply call the angular with cdn or download core of angular here
in here we'll use cdn
https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.2/angular.js
and bootstrap
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css
let's paste in our project
so first thing in angular we should give name angular app in our project before we can call features or functions of angular, after that so we gonna start writing angular it self.
Reason angular, because angular is open source, free, easy to learn, easy to maintain, develop and there are cool features in angular such as animation, touch event, templates, security and much more. If you have'nt seen list of coolest features in angular, here the guide of angular 1.x
Okay let's get started
Angular has the latest version called Angular 6 before we jump to latest version, it would be more fun if we started from Angular 1 so we can understand flow/architecture of the angular itself.
In Angular 1.x
we can simply call the angular with cdn or download core of angular here
in here we'll use cdn
https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.2/angular.js
and bootstrap
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css
let's paste in our project
so first thing in angular we should give name angular app in our project before we can call features or functions of angular, after that so we gonna start writing angular it self.
let's code
let's init name of our angular app like this :
we gonna meet with $scope one of the hottest angular features
so what is $scope ? scope is an object that refers to the application model. Basically, it is like variable built-in angular. So we gonna show button primary with our angular name app as the text of content
So how we call the angular is simple we just use curley bracket {{}}
And the output will be like this
Okay so that's it! Part 1 of become a ninja with Angular. I hope you enjoy it, thank you for reading, see you next part
- Raihan Nismara
Source :
- https://angularjs.org/
- https://en.wikipedia.org/wiki/AngularJS
- https://en.wikipedia.org/wiki/TypeScript
Comments
Post a Comment