This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @{ | |
| Layout = null; | |
| } | |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <title>Jasmine Spec Runner</title> | |
| <link rel="stylesheet" type="text/css" href="@Url.Content("~/Scripts/testing/jasmine/jasmine.css")" /> | |
| <script type="text/javascript" src="@Url.Content("~/Scripts/testing/jasmine/jasmine.js")"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <reference path="../../angular/angular.js" /> | |
| /// <reference path="../../angular/angular-mocks.js" /> | |
| /// <reference path="../../app/home/homeCtrl.js" /> | |
| /// <reference path="../../app/home/contactCtrl.js" /> | |
| /// <reference path="../../app/home/aboutCtrl.js" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| basePath = '../../'; | |
| files = [ | |
| JASMINE, | |
| JASMINE_ADAPTER, | |
| 'angular/angular.js', | |
| 'angular/angular-mocks.js', | |
| 'app/**/*.js', | |
| 'testing/unit-tests/**/*.js' | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PeopleController : ApiController | |
| { | |
| public IEnumerable<Person> Get() | |
| { | |
| var repository = new ExampleDataRepository(); | |
| return repository.GetSomePeople(); | |
| } | |
| public Person Get(int id) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ExampleDataRepository | |
| { | |
| public IEnumerable<Person> GetSomePeople() | |
| { | |
| using (var ctx = new ExampleDbContext()) | |
| { | |
| return ctx.People.AsNoTracking().Take(30).ToList(); | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular | |
| .module('myApp.ctrl.list', []) | |
| .controller('listCtrl', ['$scope', '$http', '$location', function ($scope, $http, $location) { | |
| $scope.people = []; | |
| $scope.viewPerson = function (id) { | |
| $location.path("/detail/" + id); | |
| }; | |
| $http({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <tbody> | |
| <tr ng-repeat="person in people"> | |
| <td><a ng-click="viewPerson(person.personId)"><i class="icon-edit"></i></a></td> | |
| <td>{{person.title}}</td> | |
| <td>{{person.firstName}}</td> | |
| <td>{{person.middleName}}</td> | |
| <td>{{person.lastName}}</td> | |
| <td>{{person.suffix}}</td> | |
| </tr> | |
| </tbody> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular | |
| .module('myApp.ctrl.detail', []) | |
| .controller('detailCtrl', ['$scope', '$http', '$routeParams', '$location', function ($scope, $http, $routeParams, $location) { | |
| $scope.person = { | |
| title: '', | |
| firstName: '', | |
| middleName: '', | |
| lastName: '', | |
| suffix: '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="container"> | |
| <form name="personForm" class="ng-cloak"> | |
| <fieldset> | |
| <legend>Person Details</legend> | |
| <div class="row-fluid"> | |
| <div class="control-group"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $routeProvider.when('/detail/:id', { | |
| templateUrl: '/Home/Detail', | |
| controller: 'detailCtrl', | |
| }); |
OlderNewer