عکس MBehtemam
Angular Service for Creating UUID and GUID
موضوع‌ها
۰
فورک‌ها
۱۸
ستاره‌ها
۲۹
تاریخ ایجاد
۱۸ اردیبهشت ۱۳۹۳
آخرین بروزرسانی
حدود ۵ سال قبل
لایسنس
MIT License

Angular UUID and GUID Generator

Angular UUID and GUID Generator

How to use

1. include angular.uuid2.js or angular.uuid2.min.js

<script src="angular.uuid2.js"></script>

or you can install this package from bower

bower install angular-uuid2

2

var app = angular.module('app',['angularUUID2']);

3. Inject into your controller

app.controller('mainCtrl', ['$scope','uuid2', function($scope,uuid2){

}])

4.1. now you can get UUID

app.controller('mainCtrl', ['$scope','uuid', function($scope,uuid2){
    $scope.getId = function(){
        $scope.id = uuid2.newuuid();
    }
}])

4.2. or GUID

app.controller('mainCtrl', ['$scope','uuid2', function($scope,uuid2){
    $scope.getId = function(){
        $scope.id = uuid2.newguid();
    }
}])