go(path) should be built in

20 views
Skip to first unread message

Lee Whitney

unread,
Jun 12, 2013, 1:48:18 PM6/12/13
to ang...@googlegroups.com
I've used this enough, and seen it used enough, that it seems to make sense for it to be intrinsic to angular.

Semantic HTML is great, but not everything should be an anchor tag.  We shouldn't need extra code to hyperlink from arbitrary elements.

2 cents.

app.controller('MainCtrl', function ($scope, $location) {
    $scope.go = function (path) {
        $location.path(path);
    }
});



Andy Joslin

unread,
Jun 12, 2013, 3:23:02 PM6/12/13
to ang...@googlegroups.com
Can't you just put it on $rootScope and use it everywhere? 

Lee Whitney

unread,
Jun 12, 2013, 5:39:00 PM6/12/13
to ang...@googlegroups.com
Sure.  Question is what % of developers should it be useful to before it becomes intrinsic?
Reply all
Reply to author
Forward
0 new messages