I have switched to angularJS framework and I have some issues with routing.
This is home.html view
<div id="home">
<label for="priceStart">Kaina nuo:</label><input id="priceStart" type="number" />
<label for="priceEnd">Kaina iki:</label><input id="priceEnd" type="number" />
<input type="button" value="Restoranai" />
<input type="button" value="Maisto tipai" />
<input type="button" ng-click="navigateTo('/mealList');" value="Ieškoti" />
</div>
And this is home.js home controller
FoodSearchControllers.controller('homeCtrl', ['$scope', function($scope) {
navigateTo = function(hash) {
$location.hash(hash);
};
}]);
Can anyone tell me why this doesnt work? Also, it would be good if someone can explain me how to pass variable's from home view to mealList view after this navigateTo() function is called.