Search Posts

Category: angularjs-ng-repeat

angularjs ng-repeat filter multiple fields in select options

I have problem while filtering based on options in select and then filter in ng-repeat with multiple fields. If i select English Language i have to get English movies and if i select English , Hindi i have to get both English and Hindi Movies together. Here is my code <div class=”container languageSelect pull-right col-xs-12″ ng-app=”myApp” ng-controller=”moviesCtrl”> <select id=”selectTitle” ng-options=”option for option in languageslist” ng-model=”selectedLang.movielanguage” multiple=”multiple”></select> </div> <div class=””> <figure class=”movie” ng-repeat=”record in movieslist | […]

how to sort data according datetime using st-table

i have following code my data does not sort according to datetime please help me this i am using <div st-pagination=”” st-items-by-page=”10″ st-displayed-pages=”7″></div> i think its show problem , check below code i have more then 30 records that’s why sorting problem <table st-table=’displayedAssets’ st-safe-src=”assetController.assetsData” class=”table table-bordered table-striped table-hover table-condensed mb-none dataTable no-footer”> <thead> <tr> <td colspan=”9″> <ul class=”list-inline list-unstyled”> Search <li><input st-search=”city” placeholder=”City” class=”input-sm form-control” type=”search” /></li> <li> <input st-search=”region” placeholder=”Region” class=”input-sm form-control” type=”search” […]

How to bind ng-model using ng-options inside a ng-repeat

I have a list of tasks: [{ Titel: “Title1”, Position: “9” },{ Titel: “Title2”, Position: “1” },{ Titel: “Title3”, Position: “5” },{ Titel: “Title4”, Position: “7” }] I’m trying to create a list of <select>, where each is list.lenght long and has a selected value. The html snippet: <table cellpadding=”0″ cellspacing=”0″ border=”0″> <tr> <td class=”ms-authoringcontrols”><b>Title</b></td> <td class=”ms-authoringcontrols”><b>Position</b></td> </tr> <tr ng-repeat=”t in tasks”> <td> <a href=”TODO”>{{t.Titel}}</a> </td> <td> <select ng-model=”t.Position” ng-options=”t.Position as tasks.indexOf(i)+1 for i in […]

How to bind <select> ng-model using ng-options inside a ng-repeat

I have a list of tasks: [{ Titel: “Title1”, Position: “9” },{ Titel: “Title2”, Position: “1” },{ Titel: “Title3”, Position: “5” },{ Titel: “Title4”, Position: “7” }] I’m trying to create a list of <select>, where each is list.lenght long and has a selected value. The html snippet: <table cellpadding=”0″ cellspacing=”0″ border=”0″> <tr> <td class=”ms-authoringcontrols”><b>Title</b></td> <td class=”ms-authoringcontrols”><b>Position</b></td> </tr> <tr ng-repeat=”t in tasks”> <td> <a href=”TODO”>{{t.Titel}}</a> </td> <td> <select ng-model=”t.Position” ng-options=”t.Position as tasks.indexOf(i)+1 for i in […]

AngularJS moveuprow of table and post changes to DB

Hello everyone I have kept awake for a week learning angularjs and reached a point where I managed to reach the next code which makes each row of a table generated by a ng-repeat have two buttons one to raise the row and another to lower it Every time you do an edit the position of the row you should see the change in the page and save the changes in the database (please know […]

ng-repeat using one-time binding – does track by then have an impact on performance?

As I read here (performance of $interpolate vs ng-repeat and one time binding) having the directive ng-repeat and use one-time binding is nearly equal in case of performance. Please correct me if this isn’t right! This means, that when using one-time binding on ng-repeat, the attribute track by doesn’t add any value, right? Or does it actually help me in terms of performance, because ng-repeat otherwise still would generate an index at $$hashKey? Source: AngularJS

how to call $cookies variable in module

i have following method and i want to show rights if isadmin = ‘1’ show this manuitem and if isadmin = ‘0’ not show this manu how to solve this type of logic please help me this thanks, when i refresh my url its work but when i logout and again login its not working (function () { ‘use strict’; angular .module(‘app.adduserbrand’, []) .config(config); /** @ngInject */ function config($stateProvider, $translatePartialLoaderProvider, msApiProvider, msNavigationServiceProvider) { // State […]

Compiling interpolation manually

I have a custom directive and rendering that directive using ng-repeat. what I need is I want to compile interpolation before passing into my custom directive. Find plnkr below https://plnkr.co/edit/bjdBSKCFPhgbE2aREupy?p=preview Here I want to compile interpolation in this code <display-id mycompile id={{op.id}}> </display-id> using mycompile directive. app.directive(‘mycompile’, function ($compile, $interpolate) { return { restrict: ‘EA’, replace: true, compile: function ($scope, $elm, $attrs) { return { pre: function ($scope, $elm, $attrs) { $interpolate($elm[0])($scope); } } } […]

Angularjs – How to group by rows with the same value in a specific column into one cell?

I have these columns: Column1 Column2 Column3 1 a x 1 b y 2 c z I want the result to be: Column1 Column2 Column3 1 a x b y 2 c z where row 1 and row 2 is in the same cell. How can I achieve this with Angularjs? I’ve read some others uses external dependencies. Can I achieve this without using external dependencies? Here is my sample code (run the snippet): <div […]

Next Page »