back soft

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

Draw Rectangular2D using Swing on JPanel, and display the shape resizing

Vote count: 0 I have started reading Performing custom paint with swing. I wanted to extend what I read on the tutorial and draw rectangle "live". Not just the rectangle to pop up and show on the panel, but I wanted visually see the Rectangle shape resize I drag the mouse, and finally when I release the mouse I wanted it to appear on the JPanel. I have added what I did so far with research and reading. The problem is since I am trying to catch each Rectangualr2D(this is the class I want to use) shape with mouse drag it end up looking like having a black background shape. How can I accomplish my target? Thanks for suggestions as always. import java.awt.BasicStroke; import java.awt.Color; impo...

ادامه مطلب

Get current culture in Umbraco version 7.3.5 back end with AngularJS

Vote count: 0 Is there an easy way to get current culture in Umbraco back end for a node? Right now I have to send $scope.editorState.current.id to my back end, run this C# metod ApplicationContext.Services.ContentService.GetById(editorStateId).GetCulture().TwoLetterISOLanguageName; and then use the value. Seems overkill if I can get the culture in front end right away. http://umbraco.github.io/Belle/#/api/umbraco.services.editorState asked 3 mins agoOgglas 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....

ادامه مطلب

want a logic for typing tutor in Angularjs

Vote count: 0 can anybody help me. i am bit confuse about for the logic Angularjs app Typing Tutor. I want a logic for how can i test the user input from text box and show error with color red. like this...... i want when user enter text in textbox then these text should match with the data of array name typingData. if both the element doesnot matches then show red background color of text........ like there is an example which i want...... http://crazy2be.github.io/dvorak-typing-tutor/ enter code here p{ margin-left: 200px; width: 500px; height: 200px; border : 2px dashed red; background-color: lightblue; border-collapse: collapse; } #inputText{ width: 500px; height: 50px auto; } &nbsp{{x}}...

ادامه مطلب

Angular directive to hide element on small/mobile display

Vote count: 0 Is there an 'angular way' to hide elements on small/mobile displays using a directive of some kind? Having used Angular for a while now, I thought this should be simple, but I'm just not finding it. I know about the ng-show / ng-hide directives, but I don't know if I can write an expression that inspects the current display size somehow. Do I just need to fall back to good old media queries in CSS? asked 5 mins agoJohn Rix 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....

ادامه مطلب

Angular multiple directives with shared data model

Vote count: 0 The main point of this post is that I want to avoid using $scope.$watch as it is taught to cause a performance decrease. So imagine having one shared view partial/template, call it "mypage" with two different directives, call them "directive1" and "directive2", in it that share a data model, lets call it "awesomeData" Maybe it looks something like this: Now obviously when "awesomeData" changes in either directive or the root view, the data changes in the other parts too (assuming it is two-way bound). But what if i want something else to happen in directive2 when directive1 has updated the data model, like calling a function in directive2? I could use a watcher but as mentioned...

ادامه مطلب

Angular2 form disable submit

Vote count: 0 I put a recaptcha in a signup form with angular2. I have a controller to match the recaptcha with a validator required. this.captchaControl = fb.control(false, Validators.required); this.userForm = fb.group({ ... captchaControl: this.captchaControl }); And the value is correctly set to true when the user answer it. checkReCaptcha(response){ console.log(this.userForm.valid); this.captcha = response; this.captchaControl.updateValue(true); console.log(this.userForm.valid); } The first console log show false, the second print true. In the submit button, I put the disable function: Register But the button stay disable. How can I trigger the button to check again the validity of user...

ادامه مطلب

Get data using angularjs with restful web api in mvc

Vote count: 0 I need to create an application which gets the data from store procedure and display it on view. When i was passing id from view to angularjs controller, have the value of that field, but unable to get the same in web api, it displays null(while calling). To be more specific, have tried various options, some of following: Used [FromBody] Passed string value in json from angularjs controller to webapi So, when it is null, it always throws result with fail, not success. Please help. asked 1 min agoKeyur Thakkar 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-...

ادامه مطلب

How to rerun filter in Angular

Vote count: 0 I have this HTML, I caot change it: How much is 100 * X {{100 | myFilter}} This is the Filter: X=3 app.filter(function(){ retu function(val){ retu val*X }) }) Now I want to Change X: X=5 And I want the HTML to rerun this filter and update all the values that affected by this filter and update the value I try to do it using: $rootScope.$apply() and $rootScope.$digest() But it didn't work. I searching for solution that will work, without change the source HTML. I don't search for an answers to create a directive or controller. Please wait before downvote, If I didn't explain it clearly, please comment me. I will try to explain better. asked 1 min agoAmina This entry passed throug...

ادامه مطلب

Problems by deleting rows - AngularJS and FireBase

Vote count: 0 The problem I am encountering is that if I have 2 or more rows and then want to delete a single row, it deletes all the rows at the same time. Maybe they are coected or not, strange behaviour. This problem arised after I added OrderByPriority in order to search through the table. If I delete OrderByPriority I can delete the rows individually, but then I caot search... Is there a way I can search through the table and also being able to delete single rows without deleting all the rows at the same time just by deleting a single row. Open for ideas and inpus. Click here for plunker Snapshot of a part in index.html: # Plate Number Description Price asked 1 min agoDler Ari This entr...

ادامه مطلب

Integrating AngularJS with struts 1.x

Vote count: 0 We have a legacy application using struts 1 and we would like to use angularJS as a front end framework for some pages. So how to integrate AngularJS within this application ? Some steps to follow in order to start using angularJS with struts would be heplful. Thanks asked 5 mins agokkung 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....

ادامه مطلب

AngularJS service with constructor but without requiring "new"

Vote count: 0 I have this service: .factory('LocalizationService', ['$resource', function ($resource) { // Create our service var LocalizationService = function (language) { // Get a reference to this service var self = this; // Use default if no language is supplied language = language || 'en_EU'; // Get the path of the json var path = '/assets/resources/' + language + '/resource.json'; // Retu our promise $resource(path).get(function (response) { // Assign our response to our service self.resource = response; }); }; // Retu our service retu LocalizationService; }]) and to instantiate it I would have to call var localazation = new LocalizationService(); but I would like to use it as normal,...

ادامه مطلب

angularjs select element if false OR null/undefined

Vote count: 0 I have the code below but I would like "No" to be select if s.x.user_chose_is_formula is false, null, or undefined (all in a single option). How do I do that? md-input-container.values-type-select label Values Type: md-select(ng-model="s.x.user_chose_is_formula") md-option(ng-value="true") Yes md-option(ng-value="false") No asked 39 secs agouser1387717 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....

ادامه مطلب

TypeScript Angular 2 Responses Subscribing

Vote count: 0 I'm trying to retu information from my api but I don't understand how to correctly use subscribe. With an array I retu an empty array from my service and push values into it as I get them. How would I correctly retu just a single value variable in app-component ts. Right now If I do a alert(JSON.stringify(authenticated)) it just gives me {"_isUnsubscribed":false,"_subscriptions":[{"isUnsubscribed":false}]} app-component ts checkAuthentication(){ var authenticated = this._authService.getAuthenication(); } authentication Service getAuthenication() { retu this._http.get('auth.php').subscribe(res => { if (res.json().authenticated === true){ retu true; } retu false; }); } auth.php a...

ادامه مطلب

angularjs2: initialize services with http response

Vote count: 0 We've been reading some resources for hours, but can't seem to find the right thing. It might be easy, but we can't seem to find a good way: how should we initialize multiple services, if possible at app boot time, with configuration data that we fetch from a server? asked 1 min agoymajoros 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....

ادامه مطلب

Wrapping inputs in div - angular-formly

Vote count: 0 How can I wrap two inputs (text, checkbox) in one div using formly? Solution shown here describes only how to wrap only one input. asked 3 mins agoJaqen K'uba 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....

ادامه مطلب

Switch disabled on input with angular 2

Vote count: 0 I use bootstrap with angular 2 and try to activate/deactivate an number input with a checkbox. Does not work. Also setting the class disabled does not work with inputs. asked 37 secs agozoidbergi 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....

ادامه مطلب

Monaca Cloud is not accessible through Angular

Vote count: 0 I have a Monaca app with ONSEN UI . it is build with angularJS. I am trying to access the Monaca cloud using angular in my app. My index.html looks like. I incuded the monaca-cloud-angular.js as described in document http://monaca.mobi/en/blog/lets-make-an-angularjs-module-for-monaca-backend/ Welcome page has a welcomecontroller. and in angular i defined like this. (function() { var app = angular.module('myApp', ['onsen','angularRandomString','monaca.cloud']); app.controller('welcomeController',function($scope,$http,$httpParamSerializerJQLike,MonacaBackend){ ons.ready(function() { // Add another Onsen UI element console.log('I am here in Welcome'); MonacaBackend.User.register('...

ادامه مطلب