0

I have made a table with AngularJS all is working good pagination and sorting but i want to make it as a component so that in other pages it can be used. Right now i have made a factory which calls my API and controller and server side pagination is also implemented. Now what should be the way of making table as a tag like

1
  • 1
    implement your table as a directive? Commented Oct 8, 2014 at 11:50

2 Answers 2

0

You need to encapsulate your component and behaviours into an Angular Directive.

1
0

Take a look how the table #ngtasty is implemented. Docs : http://zizzamia.com/ng-tasty/ Table directive : https://github.com/Zizzamia/ng-tasty/blob/master/src/table/table.js

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.