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
| 'use strict'; | |
| var myApp = angular.module('myApp'); | |
| myApp.controller('SomeController', ['$scope', '$rootScope', '$location', | |
| function ($scope, $rootScope, $location) { | |
| }]); | |
| //OR |
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', ['ngRoute']).config(function ($routeProvider, $locationProvider) { | |
| $routeProvider | |
| .when('/', { | |
| templateUrl: 'content/views/login/login.html', | |
| controller: 'loginController', | |
| controllerAs: 'vm' | |
| }) | |
| .when('/home', { | |
| templateUrl: 'content/views/landing/landing.html', | |
| controller: 'landingController', |
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
| 'use strict'; | |
| angular.module('myApp').service('UserService', ['$http', '$window', function ($http, $window) { | |
| return { | |
| getUsers: function () { | |
| return $http({ | |
| method: 'GET', | |
| url: $http.defaults.apiUrl + '/users', | |
| headers: { 'Authorization': $window.sessionStorage.token } | |
| }).then(function (data) { return data.data; }); |
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("on-enter", []) | |
| .directive("onEnter", function () { | |
| return function (scope, element, attrs) { | |
| element.bind("keydown keypress", function (event) { | |
| if (event.which === 13) { | |
| scope.$apply(function () { | |
| scope.$eval(attrs.onEnter); | |
| }); |
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
| { | |
| "window.menuBarVisibility": "toggle", | |
| "workbench.activityBar.visible": false, | |
| "workbench.iconTheme": "material-icon-theme", | |
| "editor.roundedSelection": false, | |
| "editor.minimap.enabled": true, | |
| "editor.minimap.renderCharacters": false, | |
| "editor.quickSuggestions": { | |
| "other": true, | |
| "comments": false, |
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 ItemModule : NancyModule | |
| { | |
| public ItemModule() : base("/items") | |
| { | |
| Get("/", p => GetAllItems(this.Bind<ItemRequestModel>())); | |
| Get("/{ItemID}", p => GetItem(this.Bind<ItemRequestModel>())); | |
| } | |
| public List<ItemResponseModel> GetAllItems(ItemRequestModel _ItemRequestModel) | |
| { |
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 ItemResponseModel | |
| { | |
| public int ItemID; | |
| public string Name; | |
| public string Message; | |
| public static ItemResponseModel ToResponseModel(Item _Item) { | |
| return new ItemResponseModel { | |
| ItemID = _Item.ItemID, |
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
| <html> | |
| <head> | |
| <link rel="stylesheet" type="text/css" href="some-website.min.css"> | |
| </head> | |
| <body ng-app="SomeWebsite"> | |
| <ng-view></ng-view> | |
| <script src="some-website.min.js" type="text/javascript" ></script> | |
| </body> | |
| </html> |
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
| using Nancy; | |
| using Nancy.Bootstrapper; | |
| using Nancy.TinyIoc; | |
| using Nancy.Conventions; | |
| using Nancy.Session; | |
| namespace SomeApi | |
| { | |
| public class Bootstrapper : DefaultNancyBootstrapper | |
| { |
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
| using Owin; | |
| using Nancy.Owin; | |
| using System; | |
| using Microsoft.Owin; | |
| using Microsoft.AspNet.SignalR; | |
| [assembly: OwinStartup(typeof(SomeAPI.Startup))] | |
| namespace SomeAPI | |
| { | |
| public class Startup |