I am new to Angular.js ....Based on the id, the fullPostController gets the required data using $http, but how am I supposed to pass the postId to the controller?
'use strict'; var myAPP = angular.module('myAPP', [ 'ngRoute' ]); myAPP.config(['$routeProvider', function ( $routeProvider ) { $routeProvider. when('/', { templateUrl: 'pages/home.html', controller: 'mainController' }). when('/post/:postId', { templateUrl: 'pages/full_post.html', controller: 'fullPostController' }). otherwise({ redirectTo: '/' }); }]); How do I pass the postId to fullPostController??