My target is to send data from Angular component to service and use service methods to work on it. Example:  export class SomeComponent {     public data: Array<any> = MyData;     public constructor(private myService: MyService) {       this.my...
This is in continuation of the previous question I asked on SO: Add directives to component selector when it is declared - Angular 7  I am dynamically creating components on a button click. The components are displayed one below another in a list lik...
Taken from the AngularJS 1 documentation:     You can also make the binding optional by adding ? : <? or <?attr.   How does the optional one differ from the non-optional one for the one-way binding?  I can seem to figure out the differences for...
Error     compiler.js:215 Uncaught Error: Template parse errors:   Can't bind to 'ngbCollapse' since it isn't a known property of 'div'. ("][ngbCollapse]="isHidden">   I have a NavbarComponent and a FooterCompon...
Is there a difference between using Controller1 vs Controller2?    angular.module('app', []) .component('foo', {     templateUrl: 'foo.html',     bindings: {         user: '<',     },     controller: Controller1, //...
I have a component unit test which isn't handling a promise rejection from a mock in the way I expected it to.  I have this function on a component which sends some data to addUserToOrganisation and handles the Promise that it returns:   public o...
using this repo for angular boilerplate https://github.com/AngularClass/NG6-starter  But I found hard to access the dom inside angular component's $postLink phase.  Am I coding it wrong? Or do I have to use directive which is not optimal for one...
I'm migrating my Angular 1.5 application to Angular UI Router 1.0-beta3 to use the component router. I'm listening for state change events on $rootScope but none of the events are fired.  Example:  angular     .module('app', [ 'ui...
I want to optimize my application so as not to use the same validation fields in two components.  I use the fields for checking "title" and "url" in the component "GalleryAddComponent" (when I add an element) and the same fiel...
I've an issue trying to get the model created after submitting the form, i'm not using any api, i'm trying to make an Anonymous "Twitter Like" locally without db or anything else. I'm using an array to store my "tweets"...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.