2016-06-24 8 views
0

私は角型1のアプリケーションを作成していますが、TypeScriptを使用しています。その後、私はstate.goが進むべき道だと思います角流星のルートを変更

// ...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 

答えて