Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /AppStart
- BundleConfig.cs
- RouteConfig.cs
- WebApiConfig.cs
- /Scripts
- /angular-ui
- /app
- actorEdit.js
- app.js
- angular-route.js
- ... lots of angular files...
- /Views
- /Actor
- Index.cshtml
- Edit.cshtml
- /Shared
- _Layout.cshtml
- var app = angular.module('myIMDBApp', ['ngRoute', 'blockUI', 'lacunaDirectives'
- , 'ui.bootstrap', 'ngTable']);
- /* some codes*/
- app.config( function ($routeProvider) {
- $routeProvider
- .when('/Actor/Edit/:ID', {
- templateUrl: '~/Views/Actor/Edit.cshtmll',
- controller: 'actorEditController'
- })
- });
- app.controller('actorEditController', ['$scope', '$http', '$uibModal', 'blockUI', 'notifyService', 'lib', '$routeParams',
- function ($scope, $http, $uibModal, blockUI, notifyService, lib, $routeParams) {
- $scope.actors = {
- name: '',
- birthplace: ''
- };
- // trying to find out which one works.
- // this
- var self = this;
- self.ID = $routeParams.ID;
- //or this
- $scope.ID = routeParams.ID || 'not defined';
- $log.info($scope.ID)
- /* some codes */
- }]);
- //app
- bundles.Add(new ScriptBundle("~/bundles/app").Include("~/Scripts/app/app.js"));
- //pages
- bundles.Add(new ScriptBundle("~/bundles/actors").Include("~/Scripts/app/actors.js"));
- bundles.Add(new ScriptBundle("~/bundles/actorCreate").Include("~/Scripts/app/actorCreate.js"));
- bundles.Add(new ScriptBundle("~/bundles/actorEdit").Include("~/Scripts/app/actorEdit.js"));
- @Scripts.Render("~/bundles/lib")
- @Scripts.Render("~/bundles/angular")
- @Scripts.Render("~/bundles/uiBootstrap")
- @Scripts.Render("~/bundles/app")
- @Scripts.Render("~/bundles/libs")
- @Scripts.Render("~/bundles/actors")
- @Scripts.Render("~/bundles/actorCreate")
- @Scripts.Render("~/bundles/actorEdit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement