Bresleveloper's AngularJS Tutorial : Basic+ Route / Routing

http://bresleveloper.blogspot.co.il/2013/08/breslevelopers-angularjs-tutorial-table.html

there is a nice thing with the $routeProvider that I learned from maybe the best and most advanced blogger in the world about angular - Ben Nadel, here in this post : http://www.bennadel.com/blog/2420-Mapping-AngularJS-Routes-Onto-URL-Parameters-And-Client-Side-Events.htm
u can put anything u want in ur routes!

Ex no. 11

view (customRouteView, only for that top div) - I added this div at the top:
<div>{{ Bresleveloper }}</div>

code (Ex 11) - there r only 2 changes, 1st I added a view with the extra div
templateUrl: 'Views/customRouteView.html'

2nd change is in the CTRL:
       
var myController = function ($scope, myService, $route) {
    console.log("myController - NEW INSTANCE");
    $scope.myService = myService;
    myService.getData();

   
if ($route.current.Bresleveloper) {
        $scope.Bresleveloper = $route.current.Bresleveloper;
    }
   
else {
        $scope.Bresleveloper = ":)";
    }
};
 
 
 


another example, to help understand Bens example is my Ex 19

now if u think its of no use, then Ben took it to the next level here : http://www.bennadel.com/blog/2441-Nested-Views-Routing-And-Deep-Linking-With-AngularJS.htm
I do advice you to make a couple of angular apps before trying that cuz its a bit hard to grasp, u use routing but not for routing, look at my examples Ex 19.

Next : http://bresleveloper.blogspot.co.il/2013/08/breslevelopers-angularjs-tutorial_22.html

Comments

  1. Wonderful thanks for sharing an amazing idea. keep it...

    Softgen Infotech is a leading training institute for all kind of the Best Software Training in Bangalore with real-time experienced trainers with 100% Placement Assistance.

    ReplyDelete
  2. Have any concern like Which is the Best AngularJS Development Company? And perplexed over choosing a development framework for your web application. Then we suggest you go with the AngularJS framework for web development and hire Angular JS developer for your web app development project. There are several prominent names among the ANGULARJS development companies, you can consider for your web application requirement.

    ReplyDelete
  3. Superb blog. When I saw Jon’s email, I know the post will be good and I am surprised that you wrote it man!
    We are the best Share Market training academy in Chennai, offering best stock market trading and technical analysis training online & live classes. Enroll now for share market classes by today.for more details contact us: +91 95858 44338, +91 95669 77791

    ReplyDelete
  4. This is a nice informative and timely taken blog. Keep Posting and useful content. if you are looking for the best AngularJS training then, You can contact us.

    ReplyDelete

Post a Comment

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

Asp.Net Ending Response options, Response.End() vs CompleteRequest()