Saturday, December 6, 2014

Creating Method in Scope – AngularJS

In this post we will quickly look into how to create methods in Scope of angular js. To do this we will be continuing with our usual sample example.

Our example is very simple, we will ask user to enter two values, say their first name and last name and while the time of entering the values, they will see the two values summing up below. For that matter, our javascript code will be simple and would only have 3 lines. Here’s how it goes.

image

To call this very method from the view, well again it is very simple.

image

You see, it is very simple. We will be looking at some more angularjs code in next posts.

Happy Reading.

Share this post

0 comments

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© 2013 Neelesh Vishwakarma
Posts RSS Comments RSS
Back to top