Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <base href="/" />
- <h1> index</h1>
- <a href="/login">login</a>
- var App = angular.module('myApp', ['ui.router']);
- App.controller("loginController", LoginController);
- App.config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
- $stateProvider
- .state('login', {
- url: '/login',
- templateUrl: '../views/home/login',
- controller: LoginController,
- controllerAs: 'controller'
- })
- $urlRouterProvider.otherwise('/');
- });
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
- );
- }
- }
- <body ng-app="myApp">
- <a ui-sref="login">login</a>
Add Comment
Please, Sign In to add comment