Angularjs ui-单击 link 时查看路由不起作用

Angularjs ui-view routing not working when click on link

我在这里使用 Angular ui-路由功能,当我点击舔时 url 在 url 栏中扩展 喜欢 this

ANgularCtrl 是

    var app = angular.module('MyApp', ['ui.router'])
app.config(['$qProvider', '$stateProvider', function ($qProvider, $stateProvider) {
    $qProvider.errorOnUnhandledRejections(false);
    var Custstate = {
        name: 'Customer',
        url: 'Views/Customer/Customer.html',
    }
    $stateProvider.state(Custstate);
}])

Ui-视图是

 <a ui-sref="Customer" ui-sref-active="active">Customer</a>
    <ui-view></ui-view>

在这样的配置寄存器状态。

var routerApp = angular.module('MyApp', ['ui.router']);

routerApp.config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
    .state('Customer', {
        url: '/Customer',
        templateUrl: 'Views/Customer/Customer.html'
    });

});

有关详细信息,请参阅 https://scotch.io/tutorials/angular-routing-using-ui-router