Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Is it possible to add an angular directive during ASP MVC helper initialization of an editor
posted

Hi,

Is it possible to add an angular directive during ASP MVC helper initialization of an editor? For example:

@(Html.Infragistics().TextEditorFor(p => p.Details.Number).HtmlAttributes(new Dictionary<string, object>() { { "ng-model", "eventNumber" } }).Render())

When performing above the ng-model attribute is added to the parent div meaning the target does not get updated as expected:

<div class="ui-igedit ui-igedit-container ui-widget ui-corner-all ui-state-default ui-igvalidator-target ng-pristine ng-untouched ng-valid ng-empty" id="Number"
     style="width: 311px; height: 25px;" ng-model="eventNumber">
    <div class="ui-igeditor-input-container ui-corner-all">
        <input class="ui-igedit-input" id="NumberEditingInput" role="textbox" style="height: 100%; text-align: left;" aria-label="Text Editor" type="text">
        <input type="hidden" value="Test5">
    </div>
</div>

Performing this using the standard Html Helper TextBox works as expected:

@Html.TextBox("Number", "", new Dictionary<string, object>() { { "ng-model", "eventNumber" } })

 

<input name="BaseItemModel.UserName" class="ng-valid ng-not-empty ng-dirty ng-valid-parse ng-touched" id="BaseItemModel_UserName" type="text" value="" ng-model="eventNumber">

Thanks,

Euan.

 

Parents
  • 7315
    Offline posted

    Hello Euan,

    Yes, it is possible to add an angular directive during ASP MVC helper initialization of an editor.

    I am working on it and trying to get more information about the error you are getting.

    I would recommend you to have a look in the following help document of igTextEditor MVC helper.

    http://www.igniteui.com/help/igtexteditor-jquery-api

    please do provide me the sample application for the further investigation of the issue.

    Looking forward to hearing you back.

    Please note US office is closed from [11/24-11/27] due to thanksgiving holiday. I will review any updates on [11/28] and respond to you accordingly.

    Sincerely,
    Divya Jain
    Associate Software Developer

Reply Children
No Data