The first half in Ljubljana ended 0-0. However, a goal by Benjamin Šeško in the 56th minute and an own goal by Roberto di Maio four minutes later meant that Slovenia now have the maximum 6 points after the first two matches in qualifying.
They beat Kazakhstan 2-1 away on Thursday.
They face Finland away in their next match on Friday the 16th of June.
Northern Ireland and Denmark make up the rest of Group H.
