Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public static class WebApiConfig
  2. {
  3. public static void Register(HttpConfiguration config)
  4. {
  5. config.MapHttpAttributeRoutes();
  6.  
  7. config.Routes.MapHttpRoute(
  8. name: "DefaultApi",
  9. routeTemplate: "api/{controller}/{action}/{id}",
  10. defaults: new { id = RouteParameter.Optional }
  11. );
  12. }
  13. }
  14.  
  15. var exampleApp = angular.module('exampleApp', ['ngRoute']);
  16.  
  17. exampleApp.config(function ($routeProvider, $locationProvider) {
  18. $routeProvider
  19. .when('/example', {
  20. templateUrl: 'Templates/example.html',
  21. controller: 'exampleCtrl'
  22. })
  23.  
  24. $locationProvider.hashPrefix('');
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement