Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. /AppStart
  2. BundleConfig.cs
  3. RouteConfig.cs
  4. WebApiConfig.cs
  5. /Scripts
  6. /angular-ui
  7. /app
  8. actorEdit.js
  9. app.js
  10. angular-route.js
  11. ... lots of angular files...
  12. /Views
  13. /Actor
  14. Index.cshtml
  15. Edit.cshtml
  16. /Shared
  17. _Layout.cshtml
  18.  
  19. var app = angular.module('myIMDBApp', ['ngRoute', 'blockUI', 'lacunaDirectives'
  20. , 'ui.bootstrap', 'ngTable']);
  21.  
  22.  
  23. /* some codes*/
  24.  
  25. app.config( function ($routeProvider) {
  26.  
  27. $routeProvider
  28. .when('/Actor/Edit/:ID', {
  29. templateUrl: '~/Views/Actor/Edit.cshtmll',
  30. controller: 'actorEditController'
  31. })
  32.  
  33. });
  34.  
  35. app.controller('actorEditController', ['$scope', '$http', '$uibModal', 'blockUI', 'notifyService', 'lib', '$routeParams',
  36. function ($scope, $http, $uibModal, blockUI, notifyService, lib, $routeParams) {
  37.  
  38. $scope.actors = {
  39. name: '',
  40. birthplace: ''
  41.  
  42. };
  43.  
  44. // trying to find out which one works.
  45. // this
  46. var self = this;
  47. self.ID = $routeParams.ID;
  48.  
  49. //or this
  50. $scope.ID = routeParams.ID || 'not defined';
  51. $log.info($scope.ID)
  52.  
  53. /* some codes */
  54.  
  55. }]);
  56.  
  57. //app
  58. bundles.Add(new ScriptBundle("~/bundles/app").Include("~/Scripts/app/app.js"));
  59.  
  60. //pages
  61.  
  62. bundles.Add(new ScriptBundle("~/bundles/actors").Include("~/Scripts/app/actors.js"));
  63. bundles.Add(new ScriptBundle("~/bundles/actorCreate").Include("~/Scripts/app/actorCreate.js"));
  64. bundles.Add(new ScriptBundle("~/bundles/actorEdit").Include("~/Scripts/app/actorEdit.js"));
  65.  
  66. @Scripts.Render("~/bundles/lib")
  67. @Scripts.Render("~/bundles/angular")
  68. @Scripts.Render("~/bundles/uiBootstrap")
  69. @Scripts.Render("~/bundles/app")
  70.  
  71. @Scripts.Render("~/bundles/libs")
  72.  
  73. @Scripts.Render("~/bundles/actors")
  74. @Scripts.Render("~/bundles/actorCreate")
  75. @Scripts.Render("~/bundles/actorEdit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement