Vote count: 0 I'm creating an angular2 application. I have a child component (MountainListComponent) which is made up of other components (but that's not important) that is included into a parent component. In the child component I have a list of mountains (), when I click on a mountain I'd like to pass a boolean variable (hidelist) to the parent component. The code of these 2 components are below. I've removed boilerplate code. Parent component: import {Component, Input} from "angular2/core"; import {MountainListComponent} from "./mountain-list.component"; @Component({ selector: 'my-mountains', template: `hidelist value: {{hidelist}} ` }) export class MountainsComponent { hidelist = false; ...
ادامه مطلبVote count: 0 We've got an Angular2 project using the barrel import patte. I'm attempting to write unit tests for it, however Karma caot seem to find the modules that are referenced by the barrel statements. The file being tested imports using: import {provider1, provider2, provider3} from "../../../core/providers"; import {component1} from "../../controls"; And karma outputs the following waings: 13 05 2016 08:57:43.732:WARN [web-server]: 404: /base/src/app/core/providers 13 05 2016 08:57:43.732:WARN [web-server]: 404: /base/src/app/core/controls Now the section of the karma config file that loads our client scripts: // paths loaded via module imports { patte: "src/app/**/*.js", included: f...
ادامه مطلبVote count: 0 I am trying to create a simple nested router. This sort of structure worked in the beta builds, but with the launch of the release candidate router I find myself stuck. http://plnkr.co/edit/7KSJpqWuBpkxi1E6tJ The plunkr above is a contrived version of my scenario. Despite having @Routes([ new Route({ path: '/applications/...', component: ApplicationRouter }) ]) the router doesn't appear to be recognising the non-terminal route. Error: Uncaught (in promise): Caot match any routes. Current segment: 'applications'. Available routes: ['/applications/...']. asked 1 min agomattdotdev 1 Answer Vote count: 0 As far as I know in the new router /... isn't necessary for routes that have c...
ادامه مطلبVote count: 0 I am looking for sample on Angular2 RC with typescript and ASP.NET web api 2 integration for CURD operations. Please share if anyone already tried this sample. Cheers Sanket asked 2 mins agoSanket Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have not seen how to do more complex stuff using content projection in Angular2. And the basic example i could imagine is some Modal that could have (or not have) header. You will have smth like: Modal template Usage: HEADER Content And the problem is: 1) i would like to hide header wrappers if header was not provided (e.g. hide "my-modal__header") 2) i would like to show some default header if header content is not provide (e.g. show "This is header" if header not provided or smth similar. How to detect presence of ng-content with exact target? I've done some plunkr to play around with example: https://plnkr.co/edit/QfBJjD3g82ksTjU5zVqw?p=preview asked 2 mins agoInviS Let's ...
ادامه مطلبVote count: 0 I'm a total newbie to Angular/Angular2, and maybe I'm getting into too deep water.... but I'm trying to display the result from a Web API controller using angular... So far I have: boot.ts: import {bootstrap} from 'angular2/platform/browser' import {HTTP_PROVIDERS} from 'angular2/http' import {AppComponent} from './app' bootstrap(AppComponent, [HTTP_PROVIDERS]); app.ts: import {Component} from 'angular2/core'; import {Http} from 'angular2/http'; @Component({ selector: 'my-app', template: '{{title}}' }) export class AppComponent { http: Http; public title; constructor(http: Http) { this.title = 'Loading list'; this.http = http; } } index.html: Angular 2 with ASP.NET 5 System.con...
ادامه مطلب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...
ادامه مطلب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...
ادامه مطلب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...
ادامه مطلب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....
ادامه مطلب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...
ادامه مطلب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...
ادامه مطلب