0
Ich mache eine Angular 1 App, aber mit TypeScript. Ich möchte Strecke in einer Funktion ändern, aber ich weiß nicht, wie es zu tun:Route in Winkelmeteor ändern
// ...some lines skipped
import templateUrl from './foodSort.html';
class FoodSort {
constructor($scope, $reactive, $location) {
'ngInject';
$reactive(this).attach($scope);
var location = $location; // this doesn't work
}
changedUrl() {
// HERE is where I want to change url
location.path('food'); // this doesn't work
}
}
const name = 'foodSort';
// create a module
export default angular.module(name, [
angularMeteor
]).component(name, {
// ... some lines skipped