back soft

مطالب مرتبط با «angular 2» در back soft | نویسنده: استخدام کار

Add comma separated currency format while entering in a text box using angularjs

Vote count: 0 i am entering amount in text box then it should append commas in between the amount(ex: i entered 123500 it should convert like 1,23,500.00 automatically when on blur) using angular js. note: this should happen within the same input box. enter image description here please any body help me on this ASAP asked 1 min agoRamesh RS Let's block ads! بخوانید...

ادامه مطلب

Error After occured after updating angular2 Beta 11

Vote count: 0 @View not working after updating angular2 beta.8 to beta11. I am getting this error in termial ERROR in ./~/ng2-bootstrap/components/datepicker/yearpicker.ts (2,14): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'. ERROR in ./~/ng2-bootstrap/components/datepicker/monthpicker.ts (2,14): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'. ERROR in ./src/app/components/subrouting/sub-routing.ts (1,20): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'. ERROR in ./s...

ادامه مطلب

SystemJS won't add default extension 'js' to mapped dependencies - Angular2 and @ngrx

Vote count: 0 I am having issues with systemJS when I have a mapped dependency within my 'app' package calls require(). In my case anytime the mapped dependency @ngrx/store calls the require(./dispatcher) function the default extension 'js' is not added, and my browser throws an error of Uncaught SyntaxError: Unexpected token...

ادامه مطلب

Why would I wrap a function in AngularJS $timeout service without a delay like they do in ng-file-upload example usage code?

Vote count: 0 In most of the fiddles containing sample usage code for ng-file-upload (https://github.com/danialfarid/ng-file-upload) like the one at (http://jsfiddle.net/danialfarid/maqbzv15/1118/), the upload response callback functions wrap their code in a $timeout service call, but these calls do not have any delay parameter passed in. The Angular.js docs for $timeout (https://docs.angularjs.org/api/ng/service/$timeout) indicate that the delay is optional, but why would you want to make a call to $timeout if not to delay the code being run. In other words instead of the following, why not do the one after: //inject angular file upload directives and services. var app = angular.module('fil...

ادامه مطلب

Angular directive to watch form validity

Vote count: 0 I have a Django app that uses Angular on the client side. I would like to disable a form's submit button if that form is invalid. In theory this is very simple: ...some fields... ok However, the form's name is dynamically set via Django. I have tried solving this w/ a custom directive... Here is some code: my_view.py: def my_view(request): my_form = MyFormClass(form_name="my_custom_name") retu render_to_response("my_template.html", {"form": my_form}, context) my_template.html: {% for field in form %} {{field}} {% endfor %} ok my_app.js: (function() { var app = angular.module("my_app", ["ui.bootstrap", "ui.sortable", "ng.django.forms"]); app.controller("MyController", [ "$scope"...

ادامه مطلب

Getting TypeError using Angular.js and Javascript

Vote count: 0 Hi i am getting the following error while selecting data using angular.js. Error: angularjs.js:107 TypeError: Caot set property '0' of undefined at n.$scope.removeBorder (adminCustomerNewController.js:55) at fn (eval at (angularjs.js:212), :4:617) at n.$eval (angularjs.js:132) at angularjs.js:251 at angularjs.js:263 at m (angularjs.js:7) at $$writeModelToScope (angularjs.js:263) at angularjs.js:263 at g (angularjs.js:261) at f (angularjs.js:261) My code is given below. {{d.day_name}} Select Category Select Subcategory...

ادامه مطلب

export to excel from table using angular js

Vote count: 0 I am using below code for export to excel:- $scope.exportData = function () { alert(document.getElementById('exportable').ierHTML); var blob = new Blob([document.getElementById('exportable').ierHTML], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}); saveAs(blob, "Report.xls"); }; it open excel with a waing message that xsl is not in correct format. The file could be corrupt or unsafe. Do you want to open it. Can anyone help me resolving this. And if there's no resolution with this plugin. Is there any other plugin that I can leverage for export to excel functionality in angular js.I need to export html table which has pagination.Any j...

ادامه مطلب

Replace draggable function in angular 2

Vote count: 0 I am trying to convert an angular directive written in angular 1.* to angular 2. Here is the original directive code: this.directiveModule.directive('draggable', function(CONFIG) { retu { restrict: 'A', link: function(scope, elem, attrs) { var setInitPosition; setInitPosition = function() { retu elem.css({ top: scope.position.top + 'px', left: scope.position.left + 'px' }); }; elem.draggable({ containment: "parent", stop: function(ev, ui) { retu scope.position = { top: ui.position.top, left: ui.position.left }; } }); retu setInitPosition(); } }; }); I have converted it to the angular 2 directive as follows: @Directive( { selector: "[draggable]" } ) export class DraggableDirecti...

ادامه مطلب

Dynamic text with updating data using firebase (.on) and angular

Vote count: 0 I am unable to update specific text from firebase with angular. I have read the firebase docs and am using .on -- The data retus in the console log when it updates and My app updates an image, but not the h1 tag which is suppose to be the integer it retus The image updates like its suppose to but the number doesn't. Any help is greatly appreciate. //controller var firebaseRef = new Firebase("https://app.firebase.io/some/data); firebaseRef.on('value', function(dataSnapshot){ var armLength = dataSnapshot.val().length; console.log(armLength); $scope.length = armLength; $scope.place = dataSnapshot.val(); if (armLength > 3){ document.getElementById("arms").style.backgroundImage = 'u...

ادامه مطلب

AngularJS scope inside a for loop

Vote count: 0 var coutas = []; for (var i = 0; i < d.length; i++) { coutas.push(JSON.parse(d[i].coutas)); } for (var i = 0; i < coutas.length; i++) { $scope.coutas = coutas[i]; } That doesn't work what I try to do is assign the variable coutas the scope.coutas asked 2 mins agoLuis Alvarez Let's block ads! بخوانید...

ادامه مطلب

How can I make my modal draggable using an angularjs/jquery directive?

Vote count: 0 Here is the directive that I am using: angular.module('myapp').directive('draggable', function($document) { retu function(scope, element, attr) { var startX = 0, startY = 0, x = 0, y = 0; element.css({ position: 'relative', border: '1px solid red', backgroundColor: 'lightgrey', cursor: 'pointer', display: 'block', width: '65px' }); element.on('mousedown', function(event) { // Prevent default dragging of selected content event.preventDefault(); startX = event.screenX - x; startY = event.screenY - y; $document.on('mousemove', mousemove); $document.on('mouseup', mouseup); }); function mousemove(event) { y = event.screenY - startY; x = event.screenX - startX; element.css({ top: y +...

ادامه مطلب

Chrome Dev tool not reporting Load time or DomContentLoaded times for Angular application

Vote count: 0 [Below "transaction" would mean "an end user activity that generates a server-trip - one or more HTTP requests resulting in responses from server] I am wondering why Chrome does not report the "Load" time or the "DomContentLoaded" time for one of the transactions in one of our Inteal company application built using Angular Here is the use case --> I Login and then I "Click_LO_on_Left_Pane". For the first transaction which is Login, chrome reports everything that is expected out of the dev tool. However, for second one Click_LO_on_Left_Pane, both the Load time and the DomContentLoaded times are missing. (Please see the screenshot) In Chrome dev tools, I do see some requests on t...

ادامه مطلب

Applying custom directive in AngularJS

Vote count: 0 I have created a custom directive which will check conditions and either display buttons or not in my HTML .When I apply it in html it is not working My directive looks like this angular.module('cmAuthorizeMdl',[]) .directive('cmAuthorizeDir', [function() { retu { enter code hererestrict: 'EA', link: function(scope, element, attrs) { //console.log(scope.policyDetails.policyBasic.policyPledged); scope.$on('authorizationData',function(event, data){ var isPolicyPledge = data.policies.policyList.authorization.pledge; var isPolicyPortfolio = data.policies.policyList.authorization.portfolio; var isIncompleteSavings =data.policies.policyList.authorization.inCompleteSaving; var isIrrev...

ادامه مطلب

validate email and come back to browser page in angular js

Vote count: 0 I have a registration page and after registration is done, it takes me to page afterregistration and says that email verification link sent to your mail. I get this done in my register controller, but issue I face is , After email validation is done , it has to redirect to my another page say Emailvalidationsuccess. How to get this done. Register Controller UserService.Create(json) .then(function (response) { if (response.json.response.statuscode == 0) { console.log(response) FlashService.Success('Registration successful', true); $location.path('/afterregister'); } else { FlashService.Error(response.json.response.statusmessage); vm.dataLoading = false; } }); } }; })(); asked 1 ...

ادامه مطلب

traverson.js integration into Angular2 app

Vote count: 0 Has anyone successfully integrated traverson into an Angular2 app? If so, is there a step-by-step available? Trying to integrate traverson.js into an Angular2 app for HATEOAS traversal. Attempted pulling in traverson.js per this technique (https://medium.com/@s_eschweiler/using-exteal-libraries-with-angular-2-87e06db8e5d1#.9qx93kgki). Run into dependency problems, starting with traverson's use of "require()". typical error: Uncaught Error: Module name "minilog" has not been loaded yet for context: _. Use require([]) Also tried using ngUpgrade to bring in traverson-angular (angular 1.x based module), and ran into more dependency problems... asked 3 mins agoStephen DeMoor This en...

ادامه مطلب

Login to youtube Api V3 in Angular JS hybrid application

Vote count: 0 I am making a hybrid application by AngularJs/Cordova that can interact with youtube but now i have some problem with Youtube Api v3 and that is login with youtube by gmail. I have tried to redirect my application to google login page with this code: var logged = VideosService.getGoogleLogged(); if (logged == false) { cordova.InAppBrowser.open('https://accounts.google.com/o/oauth2/auth?client_id=' + $rootScope.googleClientId + '&redirect_uri=http%3A%2F%2Flocalhost%2Foauth2callback&scope=https://www.googleapis.com/auth/youtube&response_type=token', '_top', 'location=yes'); } else { alert('not logged in'); } But when i successfully logged in the api I do not know how to retu to m...

ادامه مطلب

How to get row data through angular material menu inside ag-grid

Vote count: 0 I've a requirement where in ag-grid, I need to open a menu to add/edit/delete that row data. I'm using angular material menu component as cell template url. but when click on that menu item, it does not trigger onCellClicked event in ag-grid to get reference to clicked row data however If I click pixels away from menu item then event is fired. Need help to figure out, how can I get row data on menu click. my ag-grid code goes here: var columnDefs = [ {headerName: "", field: "icon", width:65}, {headerName: "Categories",field:"category_name", width:1025, cellRenderer:function(params){ // my cell renderer code goes here }, onCellClicked:function(params){ console.log("Cell is still...

ادامه مطلب

Ionic2 + Angular2 or React-native?

Vote count: 0 Which one is better for CRUD app, Ionic2 (already in beta now) or React-native? Performance is not my priority, but the application should be responsible smooth enough with touch/swipe event. asked 3 mins agoNam Pham This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب

exposing a component API in angular 2

Vote count: 0 I've been studying up on Angular 2 so as to be able to prepare my Angular 1 projects for migration in the future. One thing that I am having trouble with is understanding the plan for exposing an API from a child component so that a parent component can perform actions inside the child. As I understand it: 1) There are property bindings. These basically flow downward from parent to child and allow parents to pass data into the child 2) Event bindings allow the child to pass data back up into the parent. There is a bit of ambiguity surrounding how a parent is supposed to affect the child after the child has already been created though. I mean, the most straightforward approach w...

ادامه مطلب

Angular library no making HTTP calls

Vote count: 0 i have build angular library using this Generator all the functions of the library works fine when i call them from the app but, the functions that make HTTP calls are not working. Is there any reason preventing from making HTTPS calls from an Angular library ! note: am using $http service inside the library. asked 1 min agouser1920302 This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....

ادامه مطلب