Recent Posts
Recent Comments
목록angularjs route param (1)
HEROJOON 블로그(히로블)
AngularJS 1.x route에 param 설정하기
// route에 param 설정 app.config(['$routeProvider', function($routeProvider) { $routeProvider .when('/', { templateUrl: 'main.html', controller: 'MainController' }) .when('/samplepage/:sampleId', { templateUrl: 'samplepage.html', controller: 'SampleController' }) .otherwise({ redirectTo: '/' }); }]); // SampleController.js에서 넘겨진 Param 가져오기 $scope.sampleId = $routeParams['sampleId'];
Frontend
2020. 3. 22. 21:08