Bootstrap-table: Angularjs ng-click does not work..

Created on 31 Aug 2015  Â·  8Comments  Â·  Source: wenzhixin/bootstrap-table

Ours is a Angularjs application and we are trying to use bootstrap-table library.. One of the column has an actionable button clicking on which a modal should open. But the ng-click directive does not seem to work with bootstrap-table.

extension

Most helpful comment

@logeshilink I have a fix for this. You have to include compile as part of the directive creation and then use it to compile the contents of the element again. Working plunkr here: http://plnkr.co/edit/MyeotRj4YMR0zpofm8lf

All 8 comments

Have you used bootstrap-table-angular extension?

Yes I had.. Also I tried doing ng-click in the example(angular.html) but could not make it work..

Sent from my iPhone

On 31-Aug-2015, at 9:36 pm, 文翼 [email protected] wrote:

Have you used bootstrap-table-angular extension?

—
Reply to this email directly or view it on GitHub.

Can you provide a jsFiddle or example?
And I added an example: http://issues.wenzhixin.net.cn/bootstrap-table/#integrate/angular, hope this help.

BTW: Because the extension is not developed by myself, and I am not very familiar with angular, so if you can provide a jsFiddle would be great.

Hi,

I have created a JSFIddle with the issue. The fiddle is
https://jsfiddle.net/hn6du8a7/36/.

Basically I have used the same code as in
http://issues.wenzhixin.net.cn/bootstrap-table/#integrate/angular. Just
that I have added a ng-click event with the formatter and added a
respective handler to the controller scope. It seems that the click event
does not gets registered.

-Logesh

On 31 August 2015 at 23:06, 文翼 [email protected] wrote:

Can you provide a jsFiddle or example?
And I added an example:
http://issues.wenzhixin.net.cn/bootstrap-table/#integrate/angular, hope
this help.

BTW: Because the extension is not developed by myself, and I am not very
familiar with angular, so if you can provide a jsFiddle would be great.

—
Reply to this email directly or view it on GitHub
https://github.com/wenzhixin/bootstrap-table/issues/1353#issuecomment-136561035
.

Did anyone every find a solution to this?

Following up! Any fix for this issue as anyone using angular will want to use ng-click functions inside the table to hit functions within the controller.

@logeshilink did you ever find a fix for this?

@logeshilink I have a fix for this. You have to include compile as part of the directive creation and then use it to compile the contents of the element again. Working plunkr here: http://plnkr.co/edit/MyeotRj4YMR0zpofm8lf

then,why the latest version of bootstrap-table-angular.js do not have these related code?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

typo3ua picture typo3ua  Â·  23Comments

cgountanis picture cgountanis  Â·  14Comments

Valery1991 picture Valery1991  Â·  31Comments

iamthestreets picture iamthestreets  Â·  20Comments

DavidKrupi picture DavidKrupi  Â·  23Comments