Search Posts


On key up event list show up in angular js

<body> <div ng-app=”mvcapp” ng-controller=”AngularController”> <input type=”text” class=”myInput form-control” name=”txtStorename” id=”txtStorename” placeholder=”Search for Store..” title=”Type in a Store” data-error-message=”Please enter StoreName” ng-model=”sname” > <ul id=”myUL” ng-repeat=”StoreList in Store| filter:{StoreName:sname}”> <li ng-click=”SelectedValue(StoreList.StoreName)”>{{StoreList.StoreName}}</li> </ul> <div ng-show=”(Store|filter:sname).length==0″ style=”color:red;font-weight:bold”>No Result Found</div> </div> <script src=””></script> <script> var angular = angular.module(‘mvcapp’, []); angular.controller(‘AngularController’, function ($scope, $http) { Getallitem() function Getallitem() { $http.get(‘/Coupons/GetStore’).success(function (data) { $scope.Store = data; }); } $scope.SelectedValue = function (item) { document.getElementById(“txtStorename”).value = item; } }); </script> </body> Source: […]

IIS Rewrite rule with Angular routing

I am building an application that is an ASP.NET MVC and Angular 1.x hybrid. I use MVC as a shell and then layered Angular on top of it. I did this for a couple of reasons. First, it provided me with the ability to create an HTML helper class for script references to support cache busting. Second, it allows me to “push” a set of server side configurations to angular for things like web service […]

AngulagJS MVC Web API 2 Login

I want to create a login page where im not using the aspnetusers table but my member table. How can I create my own token, authorization/authentication? So far this is my code: web api 2 controller for api call and signin controller js “use strict”; app.controller(‘MemberSignInController’, MemberSignInController); MemberSignInController.$inject = [‘$scope’, ‘$http’, ‘$location’, ‘$routeParams’, ‘toaster’, ‘$rootScope’, ‘DataServiceFactory’] function MemberSignInController($scope, $http, $location, $routeParams, toaster, $rootScope, DataServiceFactory) { var vm = this; vm.member = {}; vm.signIn = function […]

Retrieve Selected Option Value From HTML DropDownList

I’ve a DropDownList where user has to select options and save it to database. I am using the following with AngularJs: <select> <option>—-Please Select Sub-Category—-</option> <option ng-repeat=”m in Categories” value=”{{ m.CategoryId }}” ng-model=”saveProducts.CategoryId”>{{ m.Category }}</option> </select> I can show the values in the above DropDownList but stuck to retrieve the value from the selected and pass it to the scope. I’ve tried even this, a silly one: <select> <option>—-Please Select Sub-Category—-</option> <option ng-repeat=”m in Categories” […]

why providerRoute is not working

var app = angular.module(‘MyApp’, [‘ngRoute’]); app.config(function ($routeProvider) { $routeProvider .when(“/Home”, { templateUrl: “Home/EmployeeList”, controller: “listController”, }) .when(“/Home1”, { templateUrl: “Home/EmployeeTable”, controller: “tableController”, }) .otherwise({ redirectTo: “/Home/Index” }) .controller(“listController”, function ($scope) { $scope.message = “In list controller”; }) }); why on running code TypeError:routeProvider.when(…).when(…).otherwise(…).controller error shows in cosole. Source: AngularJS

Gets Data in Json Format From AngularJs Controller

I am having a hard time with AngularJs. It works accordingly in some cases for me and when I try to change the template of the project, it doesn’t work anymore. Here is the scenario – I have a controller in ASP.NET MVC that returns the list of products in Json format and finally I call this controller using AngularJs controller as follows: C#: public JsonResult GetProducts() { var result = (from c in db.Products […]

AngularJS is not a function error

I am trying to implement a payment system in my e-commerce web application where I need installment options to be chosen by the client. I use angularjs to get that information but I get the error that all the provided functions below are not functions. I can provide additional information, but here is part related with the issue: $scope.tekcekim() = function () { $scope.strInstallmentCount = “”; }; $scope.taksit2() = function () { $scope.strInstallmentCount = “2”; […]

Chrome network Timing , how to improve Content Download

I was checking for XHR calls timing in Chrome DevTools to improve slow requests but I found out that 99% of the response time is wasted on content download even though the content size is less than 5 KB and the application is running on localhost(Working on my local machine so no Network issues). But when replaying the call using Replay XHR menu, the Content download period drops dramatically from 2.13 s to 2.11 ms(as […]

AngulaJS + FabricJS + ASP.MVC

I create project asp.mvc and add angularjs and add fabricjs Now i catch error in console: Error: [$injector:unpr] Unknown provider: FabricProvider <- Fabric <- ExampleCtrl My app.js: var app = angular.module(‘myApp’, [‘ngRoute’, ‘ngResource’]); angular.module(‘example’, [ ‘common.fabric’, ‘common.fabric.utilities’, ‘common.fabric.constants’ ]).controller(‘ExampleCtrl’, [‘$scope’, ‘Fabric’, ‘FabricConstants’, ‘Keypress’, function ($scope, Fabric, FabricConstants, Keypress) { $scope.fabric = {}; $scope.FabricConstants = FabricConstants; // // Creating Canvas Objects // ================================================================ $scope.addShape = function (path) { $scope.fabric.addShape(‘’); }; $scope.addImage = function (image) { […]

Next Page »