This is a migrated thread and some comments may be shown as answers.

Add Angular "ui-sref" as URL Parameter to DataSource

2 Answers 89 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Werner Haltner
Top achievements
Rank 1
Werner Haltner asked on 03 Aug 2015, 06:28 AM

Hello,

how can i set a "ui-sref" as a url parameter to my datasource?

 

Working:

$scope.gridData = new kendo.data.ObservableArray([
      { text: "Pink Floyd", 
       items: [{
          text:"The dark side of the Moon", 
          get url () {
              return "http://www.google.ch"+this.text;
          }
        }] },
      { text: "The Bseatles", track: "I've just seen a face" },
      { text: "Queen", track: "Innuendo" }
    ]);
      })

How can i set a url like this?:
<a ui-sref="​something.​somethingelse({​param1: ​param1value, ​param2:​param2value})" class="k-link" ng-click="events.​something(​param)" ng-bind="someValue"></a>

 

thanks,
werner

2 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 05 Aug 2015, 05:33 AM

Hello Werner,

I am not sure how the ui-router ui-sref directive format is related to the URL you refer to - perhaps I am missing something. At any case, the URL is a function which should return a string, which you may construct just in a variety of cases - there is no Kendo UI specific way to do that. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Werner Haltner
Top achievements
Rank 1
answered on 05 Aug 2015, 06:52 AM

Petyo,
thanks for your answer.

The "URL" property returns a regular http link. But, to activate a "state" i need to use a "ui-sref" link with some additional parameters.
I fix the problem, using the build in "URL" property and set the needed parameter as URL parameter. 
Now i can activate the state via the URL.

Not the best solution, but it works.

Thanks,
Werner

 

Tags
Data Source
Asked by
Werner Haltner
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Werner Haltner
Top achievements
Rank 1
Share this question
or