Posts

AngularJS: ng-model cannot be assigned to functions

Image
    This was one of the errors I faced when I started out with Angularjs, and the problem comes from thinking like Jquery developer still. I still use Jquery heavly in a few of my personal projects but have been avoiding this issue complete since. Common error : nonassign Non-Assignable Expression Feedback from users about pics in my blog. Solutions     One approach is to use directives to solve the issue and another is to use ng-init from what I've seen but I prefer using directives instead.  http://jsfiddle.net/z5z9s / - an example using ng-init (n ot by me) . Resources AngularJS - ngModel cannot be assigned to function - Stack Overflow http://stackoverflow.com/a/17793772/1265036

Project: Aptitude-Words Update 1.2.5

Image
       Recently returned to my chrome extension because I had some features I wanted to see and needed improving. I like to pretend I'm the only person who really uses this extension because I really don't know who my users are or what they would like to see but I'm open to suggestions. There is stats for the extension on weekly users but I don't think much of it. You will need to re-enable with this update since I added Google Analytics but not using it yet. Features ( Live now!) Trash button (rather than click checkbox) Donation button (I'm doing this with all my free apps) This is a one time purchase in the app, I'm looking to get rich. Redrawing words after delete. In the Future  New Logo (working on the art with a material design look). Google Analytics (I'm curious to know what popular words ppl are captured.) Page to display - word of the day, logic to prevent bad words from showing so dont try it... Reordering words - Just a r

Aspnet: legacyHMACWarning

Image
    Stumbled across this bad boy in the webconfig in an old project and was curious what it's purpose was. Since the comments didn't really help and I spent some time on to uncover its secrets. "This prevents the Windows Event Log from logging the  HMAC 1 that is being used (when  the other party needs it).When targeting ASP.NET MVC 3, this assemblyBinding makes MVC 1 and 2 references relink to MVC 3 so libraries such as DotNetOpenAuth that compile against MVC1." T he comments don't really help, in fact only rises more quesitions. Why is the DontNetOpenAuth ever compiling against MVC1? DotNetOpenAuth with MVC 4.0  - " Yes, DNOA is built against MVC 1.0, and this is by design so that it works against all versions of MVC (given the appropriate redirects). This is purely an MVC version thing -- not a .NET 4.0 thing" Resources HMACSHA512 Class (System.Security.Cryptography)

UI-grid: Bootstrap Styled and Dynamic Height for Pagination

Image
     If you've looked at my catalog-demo , you might have noticed that I used UI-grid instead of Ng-grid. I still work on a few ng-grids but I've started to really use ui-grids. Code : $scope.gridOptions.onRegisterApi = function(gridApi){ gridApi.pagination.on.paginationChanged($scope, function (pageNumber, pageSize) { var newHeight = (pageSize * 30) + 68; angular.element(document.getElementsByClassName('grid')[0]).css('height', newHeight + 'px'); console.log('get pageSize - ', pageSize); }); }; Solution:  https://fassetar.github.io/blog-examples/uigrid-responsiveheight/   Notes     To get the grid's height multiple the grid by 30px and the page size. Then add 68 to prevent the scroll-wheel moving the grid ever so slightly. Set the default for you're page size in css as well. The css I created to make the grid look like a bootstrap

UI-grid: Bootstrap Styled and Dynamic Height for Pagination

Image
     If you've looked at my catalog-demo , you might have noticed that I used UI-grid instead of Ng-grid. I still work on a few ng-grids but I've started to really use ui-grids. Code : $scope.gridOptions.onRegisterApi = function(gridApi){ gridApi.pagination.on.paginationChanged($scope, function (pageNumber, pageSize) { var newHeight = (pageSize * 30) + 68; angular.element(document.getElementsByClassName('grid')[0]).css('height', newHeight + 'px'); console.log('get pageSize - ', pageSize); }); }; Solution: Notes     To get the grid's height multiple the grid by 30px and the page size. Then add 68 to prevent the scroll-wheel moving the grid ever so slightly. Set the default for you're page size in css as well. The css I created to make the grid look like a bootstrap table is very basic and probably could use a lot more styling. Like

The Three Types of Content with Web Development

Image
Background        I don't know if anyone else thinks about content the   way I do and I'm always challenging myself to see if my thoughts hold true with others. This way idea might seem simple but it goes way back in college when I was just starting out and learning to code. During one of my classes I asked myself the old question " What is static? When is it static? " From all my experience and development in the field, I've came up with this approach which I think is based off current technologies but mostly on my experencies with cms technologies. This article goes really inhand with my other article on The Four Components of a Web Application . Details       The way I've answered both questions is by treating everything as dynamic (to some degree) and to imagine that everything eventually becomes static.Whether its a database query or whatever; to some degree everything becomes "out dated". So at what cost is it worth it to make something mo

Angularjs + Asp.net MVC Routes with Partial Views

Image
     Recently I've had the great opportunity to create something pretty awesome and I think it helped me seperate or clear up any confusion I had on project where I used two MVC frameworks on top of each other. Those two frameworks are usually AngularJs and Asp.net MVC. It can be a little hairy especially if you're new to Angularjs but when you use them right web developing is be a snap. Client Side $routeProvider.when('/', { templateUrl: 'home/_home', controller: 'AppCtrl' }).when('/product/:id', { templateUrl: function(params) { return 'home/_product/' + params.id; }, controller: 'AppCtrl' }).otherwise({ redirectTo: '/' });   What's really important here is the route for product and the parameter (look where it takes id). The id can hookup to any middle tier and from there it can handed to a model bound partial view. You can even mix in angular html attributes since the page wil

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Aspetcore: NLog with Postgresql

Installing Windows on Acer chromebook 15 cb3-532