Add Tag-Input in AngularJS

Last Reply 9 days ago By dharmendr

Posted 9 days ago

Hi all

How To display the tags input in angularjs

and also how to upload attachment using angularjs

thanks and regards

siddu

Posted 9 days ago Modified on 9 days ago

Hi sanvi,

Check this example. Now please take its reference and correct your code.

HTML

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script>
<link rel="stylesheet" href="https://mbenford.github.io/ngTagsInput/css/ng-tags-input.min.css" />
<script type="text/javascript" src="https://mbenford.github.io/ngTagsInput/js/ng-tags-input.min.js"></script>
<script type="text/javascript">
    var app = angular.module('MyApp', ['ngTagsInput']);
    app.controller('MyController', function ($scope, $http) {
        $scope.Fruits = [{ text: 'Mango' }, { text: 'Apple' }, { text: 'Orange'}];
    });
</script>
<div ng-app="MyApp" ng-controller="MyController" style="height: 200px !important">
    <tags-input ng-model="Fruits"></tags-input>
    <p>
        Values : {{Fruits}}</p>
</div>

Demo

For File Upload refer below article.

Upload multiple files with Progress Bar using AngularJS in ASP.Net MVC