I am working on a admin panel developed with angular 4 and trying to integrate a sections to customize styling like change color, bg etc. I already have developed a sections to save settings in database got them on app load as json using API.  Now...
Basically I'm looking for a way to implement a counterpart to Angular 1.x ngInit directive.  I'm aware of ngOnInit hook and the fact that it is the recommended place for initialization code. I consider ngInit directive a quick, declarative  w...
I am trying to find a way to dynamically construct a template in Angular2. I was thinking templateRef might provide a way to do this. But I could be wrong.  I found an example of templateRef being used here.  I was looking at templateRef in this exam...
I have an array that I can loop through using ng-for syntax. However, ultimately I want to access just a single element of that array. I cannot figure out how to do that.  In my component script I have    export class TableComponent {      elements:...
I am struggling with using a standard angular2 pipe in a non-standard way and I was wondering if there are any ways around it.  Assume I have a variable which its value equals the definition of a standard pipe, for example, the common "date:'...
We are working on a decoupled project with Drupal as our backend and Angular as our front-end. Everything is nearing completion but certain (dynamic, as in created in Drupal) pages require links to different pages of the angular app.  For example:...
i'm trying to access the html elements inside the tabs component using the example from angular 2 docs: https://angular.io/resources/live-examples/homepage-tabs/ts/plnkr.html Here is my implementation so far:        import {Component, ElementRef,...
in Angular 2 we have several way to create property bindings in templates. I could do something like this:  <li *ngFor="#course of courses; #i = index" id="someselector-{{i}}">{{course}}</li>   Is it possible to obtain the...
I have a component to which I am passing a template. Inside of this component I would like to pass context so that I could display data.  @Component({   selector: 'my-component',   providers: [],   template: `     <template [ngTemplateOutl...
I have code like this  <template *ngIf='mobile'>   <div class='wrapper'>     <div class='nav'>         <ng-content></ng-content>     </div>   </div> </template>  <template *ng...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.