Questions tagged [angularjs-components]

Component is a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure. A Component cannot do any DOM manipulation like directives (in the link and compile methods).

Component is an feature introduced in version 1.5.

From Understanding Components in the AngularJS documentation:

In Angular, a Component is a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure.

This makes it easier to write an app in a way that's similar to using Web Components or using Angular 2's style of application architecture.

Advantages of Components:

  • simpler configuration than plain directives
  • promote sane defaults and best practices
  • optimized for component-based architecture
  • writing component directives will make it easier to upgrade to Angular 2

The applications built using the new framework are completely component-oriented. So using them in your application it's not only a good practice but will make your application closer to the new Angular style.

350 questions
-1
votes
1 answer

$formatters and $parsers not called in AngularJS 1.6.2

@version angularjs 1.6.2 I'm trying to do some formatters and parsers to have generic input/output for my really huge project. The use case : I have a custom component with ngModelController required on it, but when I use this component in my view…
-1
votes
1 answer

angularjs - directive-like component

Here is an example in which I show the difference between implementing an ng-repeat item as directive or as component. I have an ng-repeat on a list of news.
...
Since I…
EddyG
  • 2,051
  • 3
  • 22
  • 46
-1
votes
1 answer

access resolve in component controller in angularjs 1.5

I am trying to bind to an angularjs 1.5 component a resolve value without success, In the state definition, I have replaced the common value of template properties with a value of the name of my new component. like this: .state('eventslogs.create',…
-1
votes
2 answers

Angular 1.5 - Component to retrieve html with data

I'm needing some help with Angular Component method. I have a main html with its main controller, in which i have a JSON list of client data like: clients: [{ "name": "John Jackson", "age": "21", "hair": "brown", }, { …
TRDrake
  • 202
  • 1
  • 3
  • 13
-1
votes
1 answer

Angular $compile for dynamic content

Using Angular 1.5, I want to use a generic "overlay" component to display other components within a modal. I'd like to pass in other components to be rendered within the overlay. I thought I could use $compile in my controller, but the component…
1 2 3
23
24