Month: November 2013
-
TimeSelector / TimePicker Directive – AngularJS
Hey everyone, I’ve been mucking around with directives for that last few days and one of my requirements has been a simple timepicker. Nothing too fancy, but if anyone would like to use it – feel free. See the following fiddle for the demo: http://jsfiddle.net/LFB3F/2/ The directive is initialised with both the hour and minute…
-
Passing Parameters from a Directive to a Function – AngularJS
Hey everyone, This is just a quick post to help out anyone who runs into the same problems with directives that I did today. I was able to call the controllers function from the directive, however none of the parameters were being passed. The issue ended up being that the parameters need to be named.…
-
Select List (ng-select) – AngularJS
Hey everyone, Just a quick post on how to do up a select list in AngularJS. This one took a bit of time to work out, particularly the display/value pairing. HTML: Status: JavaScript: var myApp = angular.module(‘myApp’, []); function MyCtrl($scope) { $scope.status_options = [ { display: ‘Enabled’, value: ‘enabled’ }, { display: ‘Disabled’, value: ‘disabled’…
-
Suddenly Getting The EntityFramework package is not installed on project ”. – ASP.NET MVC
Hey everyone, I am working on a small project done in ASP.NET MVC4 and started getting the following error: The EntityFramework package is not installed on project ”. Get-Package : Cannot validate argument on parameter ‘ProjectName’. The argument is null or empty. Supply an argument that is not null or empty and then try the…
-
You must call the “WebSecurity.InitializeDatabaseConnection” method before you call any other method of the “WebSecurity” class. This call should be placed in an _AppStart.cshtml file in the root of your site. – MVC4
Hey everyone, Just another small issue I ran into while attempting to retrieve a user’s ID: You must call the “WebSecurity.InitializeDatabaseConnection” method before you call any other method of the “WebSecurity” class. This call should be placed in an _AppStart.cshtml file in the root of your site. Thankfully the first Google result was pretty helpful:…
-
Forcing a Link to Behave Normally – AngularJS
Hey everyone, Another quick post. Working with AngularJS this morning I had a need for a link to redirect to a login page that was not contained within the “angular” part of the app. Unfortunately Angular was overriding the behavior and trying to route it. The solution is fairly easy for this, simply add a…
-
JSON Issue: This request has been blocked because sensitive information – MVC
Hey everyone, Started redoing Learner Lessons in MVC4 and AngularJS today. I ran into this little issue while trying to retrieve JSON: This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet It…