Vote count: 0 I have loaded values from db in my form using list.When I click the edit button then in my edit form ,I changed some value after that i clicked save button nothing send. can you correct my code. thankyou. I a using asp.net mvc. I want to send data to my mvc controller. In my app.js code `$scope.Info = { id: 0, userid: 0, Firstname: "", Lastname: "", BirthDate: "", Gender: "", Nationality: "", ResidenceCountry: "", City: "", VisaStatus: "", MaritalStatus: "", NumberOfDependents: 0, DrivingLicenseIssuedFrom: "" }; // save edits$scope.saveTable = function() { var results = []; for (var i = $scope.Info.length; i--;) { var Info = $scope.Info[i]; // actually delete user if (Info.isDe...
ادامه مطلبVote count: 0 I'm working on a little project of mine in order to lea something more about AngularJS 2, but I really caot figure out how to implement a multi-leveled routing. I've read the documentation about the new release of the Router Component and also some other topics on StackOverlfow (first, second, third), but I caot find a solution to my problem. Let's consider the following app structure And let's consider the components of my app as following: main.ts import { bootstrap } from '@angular/platform-browser-dynamic'; import { MyAppComponent } from './my-app/my-app.component'; import { APP_ROUTER_PROVIDERS } from './my-app/my-app.routes'; bootstrap(MyAppComponent, [ APP_ROUTER_PROVIDE...
ادامه مطلبVote count: 0 I have this: import {StepOnePage} from '../../pages/step-one/step-one'; import {StepTwoPage} from '../../pages/step-two/step-two'; import {StepThreePage} from '../../pages/step-two/step-one'; import {StepFourPage} from '../../pages/step-two/step-one'; import {StepFivePage} from '../../pages/step-two/step-one'; How can I put condition in these import statements? I tried to import in the constructor, so I can apply the condition: If currentStep is 'Step1' then import StepTwoPage however, it gives me this error: EXCEPTION: Error: Uncaught (in promise): Unexpected directive value 'undefined' on the View of component 'StepOnePage' Or I can import everything as another solution, howe...
ادامه مطلبVote count: 0 myApp.js angular.module("myApp" , [subApp1]); //line1 subapp1.js import mycontroller from './mycontroller'; angular.module("subApp1",[]) .config(['$stateProvider','$urlRouteProvider',function($stateProvider,$urlRouteProvider){ $stateProvider.state('home', { url:'/home', templateUrl: './app/home.html', controller : myController //line 2 }); }]) .controller('myController',['$scope','$http', myController]]); //line 3 Issue : Following is my home.html. Grid is directive that is working fine if i source data from json using ajax.but not working if i get scope data (same json) from controller. In controller am getting data using $http.get that is working fine.but still its not gettin...
ادامه مطلبVote count: 0 Controller: $scope.init = function(team){ $http.get("/getLeaderByTeamID/"+team.id) .success(function (data, status, headers, config) { // this is the object that I need to list in the table $scope.leader = data; }) .error(function (data, status, header, config) { $log.error("Error!"); }); } The data-ng-repeat directives in the table: Team Leader {{team.name}} {{l.name}} The logic is as follow: When every team is listed the init() function will send the object to the controller. In the other side the init() function will make a query with the ID team in order to get its respective leader. The function will retu one object and the second ng-repeat directive will list this into it...
ادامه مطلبVote count: 0 I have the message type nav_msgs/Odometry constantly publishing linear and angular velocity. I am calculating linear distance by taking Velocity at X and Y, multiply them by 1/rate(Hz) and summing them together. Is this calculation right? Also, I am a bit skeptical about calculating the tu using angular velocity. Any guidance here is appreciated. I am visualizing the path in RViz. It would be great if you could point me to relevant source code that I could look into. asked 29 secs agouser3792934 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Max * {{programname.country.currency_symbol?programname.country.currency_symbol:'$sss'}} {{attributes.investment_amount_max | number}} {{formValidation.required}} {{formValidation.minMax}} {{formValidation.numberMax}} {{formValidation.errorNumber}} Refer my above coding,How to format number in inside textbox number using angular js ? asked 20 secs agonew s Let's block ads! بخوانید...
ادامه مطلبVote count: 0 We are using AngularUI datepicker (https://angular-ui.github.io/bootstrap/) for Start and End Date. After integration, I was not able to select weekend dates as well as my end-date can be less than start-date. I have made a plunker for the same where I was able to select weekend dates but still can not figure out how to prevent end-date not being less than start-date. Also end-date should not be less than start-date if I click on Today. Plunker URL - http://plnkr.co/edit/tpl:8rFfZljYNl3z1A4LKSL2 asked 48 secs agoSlimshadddyyy Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How can the attributes be transparently translated from wrapper component to nested one? Considering that there is const FIRST_PARTY_OWN_INPUTS = [...]; const FIRST_PARTY_PASSTHROUGH_INPUTS = ['all', 'attrs', 'are', 'passed']; @Component({ selector: ['first-party'], inputs: [...FIRST_PARTY_OWN_INPUTS, ...FIRST_PARTY_PASSTHROUGH_INPUTS], template: ` `, directives: [ThirdParty] }) export class FirstPartyInput { ... } Can inputs be translated in batch, so they could be not enumerated in template? It looks like elementRef.nativeElement.setAttribute isn't effective here (it throws InvalidCharacterError: String contains an invalid character on any attribute, probably because of Zone)...
ادامه مطلبVote count: 0 I am trying to show sidebar menu on the website. However, it doesn't appear. App code: appModule.config([ '$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { // Default route (overrided below if user has permission) $urlRouterProvider.otherwise("/home"); $stateProvider.state('home', { url: '/home', templateUrl: '~/App/common/views/home/index.cshtml', menu: 'Home' });} html and js code : @* Below JS is for slide out menu *@ $(document).ready(function () { $("#menu").mmenu({ "slidingSubmenus": false, "offCanvas": { "zposition": "front", "pageSelector": "#page" } }); }); test Here is the website that I get: http://mmenu.frebsite.nl/examples.html...
ادامه مطلبVote count: 0 I'm working with MVC 5 application where some views are razor and some Angular based, routing also partially mvc and angular... I have to implement bread crumbs. My navigation is json/angular and I can't use sitemap or any other third party frameworks. What is the best way to approach this problem? I need some ideas or directions... Thanks asked 44 secs agoMaxim Hash Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm unable to find an answer to this, or I'm not looking in the right place, but I'm trying to find a way where I can group a number of elements (panels) inside one large panel using both AngularJS and Bootstrap. So for example, I have around 60 or so mini panels that represent customer contact forms. All of these forms sit inside one large panel with an ng-repeat. I am wanting to somehow group my contacts by different criteria (e.g By State code or by Company Type, etc.) from a dropdown control. I would like all contacts to be shown in the one panel but segregated by a .page-header (a similar setup to the example below): Has anyone seen any examples of this anywhere, or have a...
ادامه مطلبVote count: 0 I am leaing to build Ionic-2 app, I have a few components which consume services that make an http call and fetch some data, which in tu will be set in component and will finally be displayed in template. I overall understood the flow but I am making some logical mistake while coding it. My example component: export class FarmList { items: Object; constructor(private testService: TestService, public nav: NavController){} getData(): any { this.items = this.testService.fetchData() } nextView(){ this.nav.push(Farm) } showDetails(id: Number){ this.nav.push(Farm, { param1: id }) } } My corresponding service: @Injectable() export class TestService{ loading: boolean; data: Object; con...
ادامه مطلبVote count: 0 I want to call a function from outside the controller and pass it the button id. This is my current code : Manage // .. More code × Manage Company {{testData}} Close And this is the content of my controller app.controller('ModalCtrl', ['$scope', '$http', function($scope, $http) { $scope.clickMe = function() { $http.post('/modalRoutes/cdata', { id: 0 // Button ID should go here }).success(function(cdata) { $scope.testData = cdata; }); }; }]); asked 43 secs agoTrax Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a child component, receiving data from its parent and displaying text in a div. It is possible the parent sends undefined as data. When it does the div is supposed to transition its height to 0, which I do via css transition. As I don't know the length of the text, the div's height is supposed to be transitioned to auto. I found a code sample doing so, which I've transformed to fit into my component. export class LanguageDetail implements OnChange, OnInit { @Input() language: Language @ViewChild("detailPanel") detailPanel: ElementRef; private shownLanguage: Language; ngOnInit() { this.shownLanguage = new Language(); } ngOnChange() { if (this.detailPanel) { var detailPane...
ادامه مطلبVote count: 0 I want to create a simple button that toggle between two divs as follow: Being "A" my main controller, the one that I want to display first. If I suppose that my button is in "A", I could hide my "A" div and show my "B" div, when I clicked, and when I clicked again hide my "B" div and show my "A" div? It is possible? asked 13 secs agoUlises Vargas De Sousa Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Hi in my code below i am trying to convert xml Data to Json Object. using converted Json Object i am trying to create a table using angularjs. so here the problem is i am able to bind complete converted json object {{employeeList}} but failed to load individual atttribute of json object i.e.,{{metric.EmpId}}. finally from my observation i found when the converted json object is directly asigned to $scope.Employees="Employee": [ {"EmpId": "4", "Name": "Chris", "Sex": "Male", "Phone": [ { "_Type": "Home", "__text": "564-555-0122" }, { "_Type": "Work", "__text": "442-555-0154" } ], "Address": { "Street": "124 Kutbay", "City": "Montara", "State": "CA", "Zip": "94037", "Country": "U...
ادامه مطلبVote count: 0 The Angular 2 docs provide an example for creating an attribute directive that changes the background color of an element: https://angular.io/docs/ts/latest/guide/attribute-directives.html Highlight me! import { Directive, ElementRef } from '@angular/core'; @Directive({ selector: '[myHighlight]' }) export class HighlightDirective { constructor(el: ElementRef) { el.nativeElement.style.backgroundColor = 'yellow'; } } Can I also use el.nativeElement to get the content of the element (e.g. Highlight me!), modify this and update the element? asked 49 secs agoGareth Whittaker Let's block ads! بخوانید...
ادامه مطلبVote count: 0 i have angular controller which triggered with ng-click: app.controller('showAllWorkersContoller', function($scope, $http){ $http.get("/SafetyManager/workers").success(function(response){ $scope.workers = response; $scope.workerInfo = function(id){ $http({ url: '/SafetyManager/workers', method: "POST", data: { 'ID' : id }, }).success(function(response){ $scope.info = response; }); }; }); }); and when i check on chrome debug it sends in form data: {'ID':"1"} (or any other id num according to the worker i click on) but when the Servlet get the request: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out...
ادامه مطلبVote count: 1 I am very new to what i am currently working now. I may not be explain well but as much i have understood i would like to put my understanding on the same. I am using the Owin token based authentication for web api, for login i am calling the token method which retus the access token. I would like to know how to secure our web api, so that without the access token it should allow to call the web api method. I am using the angular js resource, i believe we need to define the header in angularjs service part, but where and exactly i do not have any idea, can anyone please help me on this. Example:- This my service written in angularjs, sghServices.factory('GlobalSettingsService',...
ادامه مطلب