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

3 posts, 0 answers
  1. Werner Haltner
    Werner Haltner avatar
    20 posts
    Member since:
    Jun 2006

    Posted 03 Aug 2015 Link to this post

    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. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 05 Aug 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Werner Haltner
    Werner Haltner avatar
    20 posts
    Member since:
    Jun 2006

    Posted 05 Aug 2015 Link to this post

    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

     

Back to Top