I\'m learning Angular.js and I set
and I try to change that using select element
I figured out one solution to set title in
tag.
main.js :
app = angular.module('myApp', ['ngRoute']);
app.config(['$routeProvider', '$locationProvider', function($routeProvider,$locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider.
when("/faq", {
controller: "MYCtrl",
templateUrl: "../assets/templates/faq.html",
title: "FAQ"
});
}]);
app.run(['$location', '$rootScope', function( $location, $rootScope ){
$rootScope.$on("$routeChangeSuccess", function(event, currentRoute, previousRoute) {
$rootScope.title = currentRoute.title;
});
}]);
application.html.erb: